Fixes unserialize() related warnings

After the last commit, the error handler sometimes displays
unserialize() related warnings:
"Warning: unserialize() expects parameter 1 to be string, array given"

Replacing 'unserialize()' with 'maybe_unserialize()' fixes it.