ID:               24728
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dzlist at zverina dot co dot uk
 Status:           Bogus
 Bug Type:         Session related
 Operating System: linux
 PHP Version:      4.2.2
 New Comment:

Uh..and RTFM about how superglobals work..



Previous Comments:
------------------------------------------------------------------------

[2003-07-20 11:14:25] [EMAIL PROTECTED]

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Try the latest STABLE snapshot from http://snaps.php.net/


------------------------------------------------------------------------

[2003-07-20 11:09:29] dzlist at zverina dot co dot uk

Description:
------------
Using up to date version from RedHat 8.0, 4.2.2

Calling the function below will stuff up saving of _ALL_ session data:


Reproduce code:
---------------
function import_session_variables ($prefix)
{
    global $_SESSION;
    $tab = $_SESSION;

    reset($tab);
    while (!is_null($key = key($tab) ) ) {
        $var = $prefix.$key;
        global $$var;
        $$var = $_SESSION[$key];
        next($tab);
    }
    // if you uncomment the next line sessions will save
    // hence i have a work around
    // it'd be nice to have it fixed properly though
    // reset($tab);
}

Expected result:
----------------
import all the session variable
AND the session should still save correctly

Actual result:
--------------
imports all the session variables
BUT sessions ARE NOT saved



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24728&edit=1

Reply via email to