#42388 [Opn->Bgs]: $_ SESSION don't registry variable from array and don't report error
| From: | johannes@php.net | Date: | Wed, 22 Aug 2007 20:05:35 +0000 |
| Subject: | #42388 [Opn->Bgs]: $_ SESSION don't registry variable from array and don't report error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116497@lists.php.net to get a copy of this message | ||
ID: 42388
Updated by: johannes@php.net
Reported By: sica at wnet dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: linux
PHP Version: 4.4.7
New Comment:
Thank you for taking the time to write to us, but 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
As long as there's no session_start() $_SESSION is a regular variable
without special meaning
Previous Comments:
------------------------------------------------------------------------
[2007-08-22 19:57:05] sica at wnet dot com dot br
Description:
------------
$_ SESSION don't registry variable from array and don't report error
Reproduce code:
---------------
$pesquisa = "SELECT indice FROM sica_cadastro WHERE login='$login'";
$resultado = mysql_query($pesquisa) or exit(mysql_error());
$dados = mysql_fetch_assoc($resultado);
// it's not working
$_SESSION['s_indice'] = $dados['indice'];
// it don't work
// but don't report error
Expected result:
----------------
registry a variable
Actual result:
--------------
$pesquisa = "SELECT indice FROM sica_cadastro WHERE login='$login'";
$resultado = mysql_query($pesquisa) or exit(mysql_error());
$dados = mysql_fetch_assoc($resultado);
// it's working
$indice = $dados['indice'];
$_SESSION['s_indice'] = $indice;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42388&edit=1