Skip to content

Commit c7b5578

Browse files
committed
changes for v1.10.17
1 parent c0f51b4 commit c7b5578

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/PEAR.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,13 @@ function _PEAR() {
216216
public function __call($method, $arguments)
217217
{
218218
if (!isset(self::$bivalentMethods[$method])) {
219-
trigger_error(
220-
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
221-
);
219+
if (PHP_VERSION_ID < 70000) {
220+
trigger_error(
221+
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
222+
);
223+
} else {
224+
throw new Error('Call to undefined method PEAR::' . $method . '()');
225+
}
222226
}
223227
return call_user_func_array(
224228
array(__CLASS__, '_' . $method),
@@ -229,9 +233,13 @@ public function __call($method, $arguments)
229233
public static function __callStatic($method, $arguments)
230234
{
231235
if (!isset(self::$bivalentMethods[$method])) {
232-
trigger_error(
233-
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
234-
);
236+
if (PHP_VERSION_ID < 70000) {
237+
trigger_error(
238+
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
239+
);
240+
} else {
241+
throw new Error('Call to undefined method PEAR::' . $method . '()');
242+
}
235243
}
236244
return call_user_func_array(
237245
array(__CLASS__, '_' . $method),

0 commit comments

Comments
 (0)