Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
dblog.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Dec 2012 at 16:27 UTC
Updated:
29 Apr 2018 at 16:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
neRok commentedHere is the relevant section from 7.22
The errors are occurring due to $event->variables not being a serialized array, but a boolean value (yes/no, maybe wanted to be 'N;'). I would suggest that whichever module has set the error (or has called theme_dblog_message), has not set the property correctly.
Please re-open if you can provide more info.
Comment #2
david_garcia commentedBut...in case serialized data is not properly set or corrupt in some way, at least we should not be getting WOD:
https://drupal.org/node/2213671
Comment #3
nancydruComment #4
tomarnold2 commentedHi, I ran into this issue when applying critical core update 7.59. This "fix" avoids the error but masks the upstream problem. I suppose a better fix would be to check if it's an array or not first and then write out to watchdog, but here's a simple patch that I hope someone else running into this will find helpful.
Description
Something was mis-written to dblog and when the data is being unserialized it's coming back with just a number (e.g. the serialized data might somehow be showing-up as {i:4} and then a '4' is the only thing returned). Passing this as an integer when an array is expected causes an error when attempting to view the dblogs. (Note: it's not easy to reproduce unless you somehow have your dblog with an item that was mislogged)
Solution
Cast the returned value from the call to unserialize() as an array to avoid the problem.
Caveats
Not a perfect solution:
Thanks. Love this community. I hope this helps someone like others have helped me so many times.