diff --git a/src/PEAR.php b/src/PEAR.php index 9914a7f..ba754e5 100644 --- a/src/PEAR.php +++ b/src/PEAR.php @@ -170,7 +170,7 @@ function __construct($error_class = null) $destructor = "_$classname"; if (method_exists($this, $destructor)) { global $_PEAR_destructor_object_list; - $_PEAR_destructor_object_list[] = &$this; + $_PEAR_destructor_object_list[] = $this; if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { register_shutdown_function("_PEAR_call_destructors"); $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; @@ -450,7 +450,7 @@ function _checkDelExpect($error_code) } /** - * This method deletes all occurences of the specified element from + * This method deletes all occurrences of the specified element from * the expected error codes stack. * * @param mixed $error_code error code that should be deleted @@ -598,11 +598,11 @@ protected static function _raiseError($object, protected static function _throwError($object, $message = null, $code = null, $userinfo = null) { if ($object !== null) { - $a = &$object->raiseError($message, $code, null, null, $userinfo); + $a = $object->raiseError($message, $code, null, null, $userinfo); return $a; } - $a = &PEAR::raiseError($message, $code, null, null, $userinfo); + $a = PEAR::raiseError($message, $code, null, null, $userinfo); return $a; } @@ -914,7 +914,8 @@ function __construct($message = 'unknown error', $code = null, } else { $format = $options; } - die(sprintf($format, $msg)); + printf($format, $msg); + exit($code); } if ($this->mode & PEAR_ERROR_CALLBACK && is_callable($this->callback)) { diff --git a/src/System.php b/src/System.php index a61df2d..89c53e3 100644 --- a/src/System.php +++ b/src/System.php @@ -22,7 +22,7 @@ $GLOBALS['_System_temp_files'] = array(); /** -* System offers cross plattform compatible system functions +* System offers cross platform compatible system functions * * Static functions for different operations. Should work under * Unix and Windows. The names and usage has been taken from its respectively @@ -547,7 +547,7 @@ public static function which($program, $fallback = false) * System::find("$dir -name *.php -name *.htm*"); * System::find("$dir -maxdepth 1"); * - * Params implmented: + * Params implemented: * $dir -> Start the search at this directory * -type d -> return only directories * -type f -> return only files