Skip to content
Snippets Groups Projects
Commit d470cd28 authored by Adrien Faveraux's avatar Adrien Faveraux
Browse files

PEAR php7

parent 94b83d15
No related branches found
No related tags found
No related merge requests found
......@@ -156,7 +156,7 @@ class PEAR
// }}}
// {{{ constructor
/**
* Constructor. Registers this object in
* $_PEAR_destructor_object_list for destructor emulation if a
......@@ -167,7 +167,7 @@ class PEAR
* @access public
* @return void
*/
function PEAR($error_class = null)
public function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
......@@ -191,6 +191,13 @@ class PEAR
}
}
}
function PEAR($error_class = null)
{
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct();
}
// }}}
// {{{ destructor
......@@ -842,7 +849,7 @@ class PEAR_Error
* @access public
*
*/
function PEAR_Error($message = 'unknown error', $code = null,
public function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
......@@ -900,6 +907,15 @@ class PEAR_Error
eval('$e = new Exception($this->message, $this->code);throw($e);');
}
}
function PEAR_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
// PHP4-style constructor.
// This will NOT be invoked, unless a sub-class that extends `foo` calls it.
// In that case, call the new-style constructor to keep compatibility.
self::__construct();
}
// }}}
// {{{ getMode()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment