diff options
author | Greg Beaver <cellog@php.net> | 2005-08-17 21:48:46 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2005-08-17 21:48:46 +0000 |
commit | 94c7fd06034017d4c38e0b6c9a77bef31bd0c74e (patch) | |
tree | 33ae5b272fcc1edc88450c606317c68584c1c7dc /pear | |
parent | 1dd48ca03941b8fd50221f7b02424e8db384fb21 (diff) | |
download | php-git-94c7fd06034017d4c38e0b6c9a77bef31bd0c74e.tar.gz |
add return by ref from PEAR::raiseError
Diffstat (limited to 'pear')
-rw-r--r-- | pear/PEAR.php | 16 | ||||
-rw-r--r-- | pear/package-PEAR.xml | 3 |
2 files changed, 12 insertions, 7 deletions
diff --git a/pear/PEAR.php b/pear/PEAR.php index fa89ea56d4..6e1892d66f 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -492,7 +492,7 @@ class PEAR * @see PEAR::setErrorHandling * @since PHP 4.0.5 */ - function raiseError($message = null, + function &raiseError($message = null, $code = null, $mode = null, $options = null, @@ -537,9 +537,11 @@ class PEAR $ec = 'PEAR_Error'; } if ($skipmsg) { - return new $ec($code, $mode, $options, $userinfo); + $a = &new $ec($code, $mode, $options, $userinfo); + return $a; } else { - return new $ec($message, $code, $mode, $options, $userinfo); + $a = &new $ec($message, $code, $mode, $options, $userinfo); + return $a; } } @@ -553,14 +555,16 @@ class PEAR * @param string $message * */ - function throwError($message = null, + function &throwError($message = null, $code = null, $userinfo = null) { if (isset($this) && is_a($this, 'PEAR')) { - return $this->raiseError($message, $code, null, null, $userinfo); + $a = &$this->raiseError($message, $code, null, null, $userinfo); + return $a; } else { - return PEAR::raiseError($message, $code, null, null, $userinfo); + $a = &PEAR::raiseError($message, $code, null, null, $userinfo); + return $a; } } diff --git a/pear/package-PEAR.xml b/pear/package-PEAR.xml index ce5e1515d0..301233e850 100644 --- a/pear/package-PEAR.xml +++ b/pear/package-PEAR.xml @@ -49,11 +49,12 @@ </maintainers> <release> <version>1.3.6</version> - <date>2005-08-16</date> + <date>2005-08-17</date> <state>stable</state> <license>PHP License</license> <notes> * Bump XML_RPC dependency to 1.4.0 + * return by reference from PEAR::raiseError() </notes> <provides type="class" name="OS_Guess" /> <provides type="class" name="System" /> |