Log message #4187042

# At Username Text
# May 21st 2019, 13:44 birdy247 it uses JWT auth to authenticate people
# May 21st 2019, 13:43 birdy247 In short, we have a statless "widget" that we have added to our page
# May 21st 2019, 13:43 birdy247 Presumbly cake then handles fetching the session from the server when I do this->Auth->user() ?
# May 21st 2019, 13:42 birdy247 When I login, I am created a session on the server?
# May 21st 2019, 13:41 birdy247 Just trying to get my head around something
# May 21st 2019, 12:30 hmic this setting is useless for php, mostly. as the php task will not keep any resource between requests (not not CLI or APACHE SAPI IMHO)
# May 21st 2019, 11:57 paula to use persistent connection to the database I just need set 'persistent' => true in the database.php? I've already tried it but doesn't work the connection don't keep alive.
# May 21st 2019, 10:23 welo.lamacchia on every table works fine but only for one table i received this error
# May 21st 2019, 10:22 welo.lamacchia it's automatic
# May 21st 2019, 10:22 welo.lamacchia i use with Cake Crud Listener
# May 21st 2019, 10:20 neon1024 https://github.com/FriendsOfCake/search/tree/master/docs
# May 21st 2019, 10:20 neon1024 It’s now `$this->request->getQueryParams()`
# May 21st 2019, 10:20 neon1024 @welo.lamacchia Did you update your controller code?
# May 21st 2019, 10:06 welo.lamacchia i use it with Crud plugin with Crud.Search listener
# May 21st 2019, 10:06 welo.lamacchia i compared all my tables but no differences found
# May 21st 2019, 10:05 welo.lamacchia after update FriendsOfCake Search plugin, in only one of my tables i saw this error: Warning (2): call_user_func_array() expects parameter 1 to be a valid callback, class 'Search\Model\Behavior\SearchBehavior' does not have a method 'searchParams' [CORE/src/ORM/BehaviorRegistry.php, line 253]
# May 21st 2019, 10:00 neon1024 Silly, I can abstract the condition out to a class method :face_palm:
# May 21st 2019, 09:48 neon1024 I’ve only managed the validation methods from the controller before
# May 21st 2019, 09:47 neon1024 If you have more than one validation rule which relies on the same condition is that a good opportunity to add a new validation method, but where would you bind the condition ?
# May 21st 2019, 09:36 dereuromark I have to also add that case into my CastTrait i just saw. Should gracefully return null.
# May 21st 2019, 09:31 neon1024 Well spotted!
# May 21st 2019, 09:31 dereuromark empty string is not null.
# May 21st 2019, 09:31 neon1024 Although this does feel more like correct behaviour, and an incorrect assumption on my behalf
# May 21st 2019, 09:30 slackebot <neon1024>
# May 21st 2019, 09:29 neon1024 Seems there is a bug in Hash::get or it looks like it to me
# May 21st 2019, 09:29 neon1024 My mistake, my test was wrong
# May 21st 2019, 09:28 neon1024 Test-case passes, so it’s just my code. I wonder what I’ve done wrong
# May 21st 2019, 09:23 neon1024 See if I can replicate it
# May 21st 2019, 09:23 neon1024 I’m going to add a test-case
# May 21st 2019, 09:21 dereuromark keep ?? or use my CastTrait. i use it for phpstan level 7 code.
# May 21st 2019, 09:20 admad > If the posted value was missing, you’d expect `0` right? Yes I would
# May 21st 2019, 09:08 neon1024 Which doesn’t feel right at all
# May 21st 2019, 09:08 neon1024 `empty($this->getRequest()->getData('payment_charge_amount')) ? 0 : $this->getRequest()->getData('payment_charge_amount'),`
# May 21st 2019, 09:08 neon1024 THen you end up with
# May 21st 2019, 09:06 neon1024 Which leads to `$this->getRequest()->getData('payment_charge_amount') ?? 0` which defeats the point of the default value right?
# May 21st 2019, 09:05 neon1024 :thinking_face:
# May 21st 2019, 09:05 neon1024 `CallsController.php:203:null`
# May 21st 2019, 09:05 neon1024 If the posted value was missing, you’d expect `0` right?
# May 21st 2019, 09:05 neon1024 `$this->getRequest()->getData('payment_charge_amount', 0)`
# May 21st 2019, 09:05 neon1024 So
# May 21st 2019, 08:53 neon1024 Perhaps it’s a hasMany, and is generating an extra query, and the order has been moved to the other query