From:             dizit at mail dot ru
Operating system: Win XP
PHP version:      4.3.4
PHP Bug Type:     Session related
Bug description:  session_unset()

Description:
------------
Run script below and see next:

BEGIN___________________________________________________
set var=56

session_register("var")

var=56
$GLOBALS["var"] - 56

session_unset()

ATENTION----> var=56
ATENTION----> $GLOBALS["var"] - and gettype($GLOBALS["var"]) is NULL

session_register("another")

ATENTION----> var="another"
___________________________________________________END

If run the script in the Zend Develoment Env. 3.02 Plus and see next
result:

BEGIN____________________________________________________
set var=56

session_register("var")

var=56
$GLOBALS["var"] - 56

session_unset()

var=56

$GLOBALS["var"] = 56 and gettype($GLOBALS["var"]) is integer

session_register("another")

var=56
____________________________________________________END


Win XP
Apache 1.3.26
php 4.3.2 and 4.3.4

php.ini
register_globals = On





Reproduce code:
---------------
<?
session_start();

$var=56;
echo '<p>set var=56';

session_register('var');
echo '<p>session_register("var")';

echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'];

session_unset();echo '<p>session_unset()';

echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'].' and
gettype($GLOBALS["var"]) is '.gettype(@$GLOBALS['var']);

session_register('another');
echo '<p>session_register("another")';

echo '<p>Once more echo var='.$var;

session_destroy();
?>

Expected result:
----------------

run on PHP Version 4.2.2 and see:

set var=56

session_register("var")

var=56
$GLOBALS["var"] - 56

session_unset()
var=NULL
$GLOBALS["var"] = NULL

session_register("another")

var=NULL



-- 
Edit bug report at http://bugs.php.net/?id=27128&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27128&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27128&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27128&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27128&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27128&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27128&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27128&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27128&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27128&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27128&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27128&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27128&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27128&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27128&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27128&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27128&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27128&r=float

Reply via email to