Track Errors and $php_errormsg
| From: | Blair Robertson | Date: | Mon, 03 Mar 2003 04:51:36 +0000 |
| Subject: | Track Errors and $php_errormsg | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14056@lists.php.net to get a copy of this message | ||
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 ?
Blair