Bug #16070 Updated: Set any variable after error occur..
| From: | sniper@php.net | Date: | Thu, 14 Mar 2002 19:36:13 +0000 |
| Subject: | Bug #16070 Updated: Set any variable after error occur.. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-2512@lists.php.net to get a copy of this message | ||
ID: 16070
Updated by: sniper@php.net
Reported By: rusek@ccs.cz
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Windows, Unix BSD, Linux RedHat
PHP Version: 4.1.2
New Comment:
This is not a bug. Please double-check the documentation available
at http://www.php.net/manual/ and the instructions on how
to report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2002-03-14 10:01:14] rusek@ccs.cz
<?PHP
/* reported by Milan Rusek, rusek@ccs.cz
*/
echo 'Before: '.(isset($retval)?'set':'not set');
echo "\n";
$retval = @unserialize('blablabla'); // FAIL !!!!
// variable $retval it should not be set!!
echo 'After : '.(isset($retval)?'set':'not set');
echo "\n";
echo "It must be same results!\n";
/* ----------------------------------------------
* I have found only one solution, but I mean
* that it is very small powerful:
$retval = @unserialize('blablabla');
if (serialize($retval) == 'blablabla')
{
// is ok.
}
else
{
// is failed.
}
* Do you have some better solution?
*/
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16070&edit=1