[PHPLIB-DEV] BUG: sessions.inc line 272 From: sjbrown (shandy <email protected>)
Date: 04/13/00

PHPLIB has trouble handling arrays of objects. Does anyone know how to
get around this? I want to use an array or linked list (apparently the
same thing in PHP) of objects. Please help, i've been stuck on this for
weeks.

Here's the code that'll make it crash and burn:

<?php
page_open( array(
            "sess" => "Player_Session"
        ) );
   
    
class Node
{
    var $classname = "Node";
    var $persistent_slots = array( "id" );
    
    var $id;
}
                          
class MyList
{
    var $classname = "MyList";
    var $persistent_slots = array( "stores" );
        
    var $stores = array();

    function thaw()
    {
        $temp = new Node;
        $this->stores[0] = $temp;
    }
}

$test = new MyList;

$test->thaw();

$sess->register("test");

page_close();

?>

-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Shandy (Andy) Brown
http://sjbrown.geeky.net
////////////////////////////////////////////////////
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.