php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42388 $_ SESSION don't registry variable from array and don't report error
Submitted: 2007-08-22 19:57 UTC Modified: 2007-08-22 20:05 UTC
From: sica at wnet dot com dot br Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.4.7 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sica at wnet dot com dot br
New email:
PHP Version: OS:

 

 [2007-08-22 19:57 UTC] 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;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-22 20:05 UTC] johannes@php.net
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 08:02:42 2024 UTC