PEAR::raiseError() can be called statically - don't assume $this will be

there!
This commit is contained in:
Chuck Hagenbuch 2001-08-15 21:26:12 +00:00
parent 84cdabcec0
commit 2b9e767822

View File

@ -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;
}