Error at offset %zd of %zd¶
Description¶
Unserialize() reads a string, and parse it to produce a value: integer, string, array, object… It uses a specific format, and when there isn’t enough information to successfully run the parse, this error message is emitted.
Example¶
<?php
unserialize("an invalid string");
?>
Solutions¶
Catch the returned value of the function: when it is null, an error occurred.