Log message #3880494

# At Username Text
# May 26th 2016, 09:31 phpcoder guys cake returns this query https://gist.github.com/anonymous/7ff67a7838792aeb584bc70e78b66329 it works but why does it use 1 = 1 here https://gist.github.com/anonymous/7ff67a7838792aeb584bc70e78b66329#file-test-sql-L67 it does not look very well
# May 26th 2016, 09:30 neon1024 Had 2 crashes as well
# May 26th 2016, 09:30 neon1024 Dunno really birdy247 all I've done so far is update my laptop / os / packages / code
# May 26th 2016, 09:30 Eax Ey folks! Cake3 question: I have this LoginController: https://gist.github.com/eaxexe/64442df2e6465a67fe7a0fcd98ad27f7 (It uses Facebook to auth the login, hence no password checking) - My question is: Can anyone see why the cookie simply dissapears after being set and the user being redirected? Thanks! ð???
# May 26th 2016, 09:29 birdy247 @neon1024: How is cake fest
# May 26th 2016, 09:29 marlinc Anyone here going to Amsterdam's train stations by any chance on Saturday?
# May 26th 2016, 09:27 neon1024 :+1::skin-tone-2:
# May 26th 2016, 09:27 birdy247 bernat1 thanks also
# May 26th 2016, 09:27 birdy247 @neon1024: thanks!
# May 26th 2016, 09:26 birdy247 got there :slightly_smiling_face:
# May 26th 2016, 09:26 birdy247 phew
# May 26th 2016, 09:23 birdy247 so I simply need to return $entities;
# May 26th 2016, 09:23 birdy247 ok
# May 26th 2016, 09:23 neon1024 Beyond that, my brain has imploded :(
# May 26th 2016, 09:22 neon1024 Specifically where $alteredData is set
# May 26th 2016, 09:22 neon1024 Yep, now read the code above that
# May 26th 2016, 09:21 birdy247 // Another listener callback public function doSomethingElse($event) { // ... $event->result['order'] = $alteredData; }
# May 26th 2016, 09:21 bernat1 @birdy247, my guess is that $event->result is an Event object.
# May 26th 2016, 09:21 neon1024 I agree that the code visually is misleading
# May 26th 2016, 09:20 neon1024 If you look at the book it is returning the event data array, not the event object
# May 26th 2016, 09:20 neon1024 Well that's wrong, check the book
# May 26th 2016, 09:19 birdy247 and i get: Error: Cannot use object of type Cake\Event\Event as array
# May 26th 2016, 09:18 birdy247 debug($event->result['timetable']);
# May 26th 2016, 09:18 birdy247 and this is what I am doing after its dispatched
# May 26th 2016, 09:18 birdy247 that is what I am returning
# May 26th 2016, 09:18 birdy247 $event->result['timetable'] = $entities; $result = $event; return $result;
# May 26th 2016, 09:18 neon1024 At least that's how it reads to me
# May 26th 2016, 09:17 neon1024 Or the callback return ['data']
# May 26th 2016, 09:17 neon1024 When it should be $event->result['data']
# May 26th 2016, 09:17 neon1024 So the error you see sounds like $event['data'}
# May 26th 2016, 09:16 neon1024 Event results can be altered either using the event object result property directly or returning the value in the callback itself:
# May 26th 2016, 09:16 neon1024 I think this is relevant
# May 26th 2016, 09:16 birdy247 Error: Cannot use object of type Cake\Event\Event as array
# May 26th 2016, 09:13 birdy247 gd skill
# May 26th 2016, 09:13 birdy247 :)
# May 26th 2016, 09:13 birdy247 thats wat I have
# May 26th 2016, 09:13 birdy247 I meant to write $event->result
# May 26th 2016, 09:13 neon1024 I call it megatasking!
# May 26th 2016, 09:13 birdy247 sorry, my bad
# May 26th 2016, 09:13 neon1024 I'm in a mental muddle because my machine keeps crashing, I'm trying to do updates, upgrade php, talk on here and also update php storm
# May 26th 2016, 09:12 neon1024 Would be how I'd think it works