From:             [EMAIL PROTECTED]
Operating system: Windows, Unix BSD, Linux RedHat
PHP version:      4.1.2
PHP Bug Type:     Variables related
Bug description:  Set any variable after error occur..

<?PHP
/* reported by Milan Rusek, [EMAIL PROTECTED]
 */
 
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 bug report at http://bugs.php.net/?id=16070&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16070&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16070&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16070&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16070&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16070&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16070&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16070&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16070&r=submittedtwice

Reply via email to