From: Chuck Hagenbuch Date: Wed, 15 Aug 2001 21:26:12 +0000 (+0000) Subject: PEAR::raiseError() can be called statically - don't assume $this will be X-Git-Tag: PRE_SUBST_Z_MACROS~510 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b9e7678225a73214fbb8c72106727c1ba432ab1;p=php PEAR::raiseError() can be called statically - don't assume $this will be there! --- diff --git a/pear/PEAR.php b/pear/PEAR.php index 16172f86c7..c1f8256f11 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -366,7 +366,7 @@ class PEAR $message = $message->getMessage(); } - if (sizeof($this->_expected_errors) > 0 && in_array($code, end($this->_expected_errors))) { + if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && in_array($code, end($this->_expected_errors))) { $mode = PEAR_ERROR_RETURN; }