note 90113 rejected from function.unserialize by thiago
| From: | thiago@php.net | Date: | Tue, 07 Apr 2009 12:30:34 +0000 |
| Subject: | note 90113 rejected from function.unserialize by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-152890@lists.php.net to get a copy of this message | ||
Note Submitter: w dot laurencine at teknoa dot net
----
When dealing with a string which contain "\r", it seems that the length is not evaluated
correctly. The following solves the problem for me :
// remove the \r caracters from the $unserialized string
$unserialized = str_replace("\r","",$unserialized);
// and then unserialize()
unserialize($unserialized);