|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-09-06 13:53 UTC] wolfram at kriesing dot de
i am working on a big import script and just for fun i checked the size of $GLOBALS on every turn, and i realized it grew constantly, i found out that
pushErrorHandling
pushes 2 elements on the array _PEAR_error_handler_stack, but
popErrorHandling
pop's only one off the array, so it grows on every use!
and since those are used in DB/mysql.php and File/CSV.php my memory limit comes closer with every run through the while-loop
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 11:00:01 2025 UTC |
Could you please try if the following patch (untested) works for you? Index: PEAR.php =================================================================== RCS file: /repository/php4/pear/PEAR.php,v retrieving revision 1.47 diff -u -r1.47 PEAR.php --- PEAR.php 21 Jul 2002 07:04:45 -0000 1.47 +++ PEAR.php 18 Sep 2002 15:15:50 -0000 @@ -582,7 +582,8 @@ { $stack = &$GLOBALS['_PEAR_error_handler_stack']; array_pop($stack); - list($mode, $options) = $stack[sizeof($stack) - 1]; + array_pop($stack); + list($mode, $options) = $stack[sizeof($stack)]; if (isset($this)) { $this->setErrorHandling($mode, $options); } else {This solution works. It just takes off the extra error mode after we're done using it. --- PEAR2.php Tue Sep 24 15:33:18 2002 +++ PEAR.php Tue Sep 24 15:35:24 2002 @@ -583,6 +583,7 @@ $stack = &$GLOBALS['_PEAR_error_handler_stack']; array_pop($stack); list($mode, $options) = $stack[sizeof($stack) - 1]; + array_pop($stack); if (isset($this)) { $this->setErrorHandling($mode, $options); } else {