Hi

On 12/8/22 15:11, Dan Ackroyd wrote:
None of the 'Invalid serialization' errors tell the programmer who
reads them what is wrong with the data.

Unless the code was written in such a way that the data was in (and
was logged) in the callstack, that would be a bit frustrating as
someone might need to do quite a bit of work to find the data that was
triggering the problem.

Changing those to be specific error type, that included a method of
'getBadData' could make it easier to fix those issues.


*Strong* disagree, because:

https://wiki.php.net/rfc/improve_unserialize_error_handling.

We should not make it easier for developers to programmatically shoot themselves in their feet with unserialize(). If your data fails to unserialize, the only safe option is to throw it away.

Best regards
Tim Düsterhus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to