Re: Is this a bug in the new PEAR?

From: Date: Fri, 22 Feb 2008 23:52:12 +0000
Subject: Re: Is this a bug in the new PEAR?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28558@lists.php.net to get a copy of this message
Dmitri wrote:
Hello! I am trying to write a pear installer-based plugin system, similar to example in Greg Beaver's book (MyBlog example) I came across the strange behaviour when calling getChannel() method of PEAR registry class Can someone try this code and tell me if this is a bug or am I just using it wrong ? I just want to know if maybe there is a problem on my server, so just need someone to duplicate this bug (or not) This is the code (very simple test) <?php require_once 'PEAR/Config.php'; $config = PEAR_Config::singleton(); $reg = $config->getRegistry(); // $config is PEAR_Config object $chan = $reg->getChannel('pear.php.net'); // always returns error object listing every possible error print_r($chan); ?> For me it's always returns pear error object listing every possible error - notice I even use the pear.php.net channel just to be sure that this is not a problem with channel.xml (I trust that channel.xml on pear site is correct) But this error object also lists many elements of the chanel.xml file that are correct. I see my mistake now. What I got back was
PEAR_ChannelFile Object and inside that object the first thing I saw was [_stack] => PEAR_ErrorStack Object and then I saw [_errorMsgs] => Array with lots of error messages. Now I understand that it supposed to look like this and they are not the actual errors, only the list of possible errors. -- Open Source ALL content management with streaming video http://wiki.sharedlog.com

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