Re: Track Errors and $php_errormsg

From: Date: Mon, 03 Mar 2003 23:17:24 +0000
Subject: Re: Track Errors and $php_errormsg
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-14062@lists.php.net to get a copy of this message
On Mon, 2003-03-03 at 05:51, Blair Robertson wrote: > There is a potential problem with the way track_errors and $php_errormsg > are used in PEAR. > > In PEAR.php there is an ini_set() call turning on track errors, which is > fine. But in several other files there are subsequent calls also turning > track_errors on and then tragically ini_restore()ing track_errors - > which set's it back to what the php.ini has set. > > This is can become a problem when the php.ini has track_errors off - as > my server does and is the PHP default. > > What I was doing to find this was to connect to MySQL (which is where > the ini_restore() is called in my case) and then (through > XML_Tree::getTreeFromFile()) call XML_Parser::setInputFile() on a > non-existent file, which would promptly inform me that $php_errormsg is > undefined. > > The only files that are setting and restoring the track_vars are : > DB/fbsql.php > DB/mysql.php > PEAR/Registry.php > > Could the calls in these files just be removed ? Yes. They were added here before track_errors was enabled in PEAR.php. Thanks for the heads-up. - Stig

« previous php.pear.dev (#14062) next »