note 36323 added to function.unserialize
| From: | johan_php at popbandetleif dot cjb dot net | Date: | Sun, 05 Oct 2003 10:12:04 +0000 |
| Subject: | note 36323 added to function.unserialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-57834@lists.php.net to get a copy of this message | ||
Note that in case the passed string is not unserializeable, FALSE is returned but it is not of
boolean type.
Therefor:
// this will never happen
if (unserialize( not unserializeable data) === false) {
echo("Error message");
}
// use this instead
if (unserialize( not unserializeable data) == false) {
echo("Error message");
}
----
Manual Page -- http://www.php.net/manual/en/function.unserialize.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36323
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36323&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36323&report=yes
Search Tool -- http://master.php.net/manage/user-notes.php