Bug #14880: _SESSION will NOT automatically register it as a session variable

From: Date: Sun, 06 Jan 2002 02:52:20 +0000
Subject: Bug #14880: _SESSION will NOT automatically register it as a session variable
Groups: php.dev 
Request: Send a blank email to php-dev+get-76004@lists.php.net to get a copy of this message
From:             247net@gmx.net
Operating system: Debian 3.0 (Woody)
PHP version:      4.1.0
PHP Bug Type:     Session related
Bug description:  _SESSION will NOT automatically register it as a session variable

<?
function func1(){
  echo "Set iVar<br>";
  $_SESSION["iVar"] = 8;
}
function func2(){
  echo "\$_SESSION[iVar] ".$_SESSION[iVar]."<br>";
}
session_start();

if ($_REQUEST["action"] != "page2"){
  func1();
}

func2();

if (session_is_registered("iVar") == FALSE){
  echo "iVar is not registered<br>";
}
echo "<a href='$PHP_SELF?action=page1'>page1</a><br>";
echo "<a href='$PHP_SELF?action=page2'>page2</a><br>";
?>
-- 
Edit bug report at: http://bugs.php.net/?id=14880&edit=1



Thread (13 messages)

« previous php.dev (#76004) next »