Accessing objects

From: Date: Fri, 02 Jan 2004 05:01:34 +0000
Subject: Accessing objects
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9898@lists.php.net to get a copy of this message
i'm trying to access a directive in a Config object I've created: $conf = array('pear.errorHandling.mode' => PEAR_ERROR_TRIGGER, 'pear.errorHandling.options' => E_USER_ERROR); $config = new Config(); $appConfig =&$config->parseConfig($conf, 'phparray',array('name' => 'conf')); $errorMode=&$appConfig->getItem('directive','pear.errorHandling.mode')->getC ontent(); And I'm getting a parse error on the last line. If i do it in 2 steps, i.e: $obj=&$appConfig->getItem('directive','pear.errorHandling.mode') $errorMode=$obj->getContent(); I don't get an error. Why can't i do this all in one step?

« previous php.pear.general (#9898) next »