mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
N°8834 - Add compatibility with PHP 8.4 (#819)
* N°8834 - Add compatibility with PHP 8.4 * Rollback of scssphp/scssphp version upgrade due to compilation error
This commit is contained in:
@@ -17,10 +17,5 @@ Included files
|
||||
==============
|
||||
- ``OS/Guess.php``
|
||||
- ``PEAR.php``
|
||||
- ``PEAR/Error.php``
|
||||
- ``PEAR/ErrorStack.php``
|
||||
- ``System.php``
|
||||
|
||||
|
||||
``PEAR/Error.php`` is a dummy file that only includes ``PEAR.php``,
|
||||
to make autoloaders work without problems.
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"": "src/"
|
||||
}
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"include-path": [
|
||||
"src/"
|
||||
@@ -23,6 +23,7 @@
|
||||
},
|
||||
"type": "library",
|
||||
"require": {
|
||||
"php": ">=5.4",
|
||||
"pear/console_getopt": "~1.4",
|
||||
"pear/pear_exception": "~1.0"
|
||||
},
|
||||
|
||||
@@ -245,7 +245,7 @@ class OS_Guess
|
||||
return array();
|
||||
}
|
||||
if (!@file_exists('/usr/bin/cpp') || !@is_executable('/usr/bin/cpp')) {
|
||||
return $this-_parseFeaturesHeaderFile($features_header_file);
|
||||
return $this->_parseFeaturesHeaderFile($features_header_file);
|
||||
} // no cpp
|
||||
|
||||
return $this->_fromGlibCTest();
|
||||
|
||||
@@ -49,7 +49,9 @@ $GLOBALS['_PEAR_destructor_object_list'] = array();
|
||||
$GLOBALS['_PEAR_shutdown_funcs'] = array();
|
||||
$GLOBALS['_PEAR_error_handler_stack'] = array();
|
||||
|
||||
@ini_set('track_errors', true);
|
||||
if(function_exists('ini_set')) {
|
||||
@ini_set('track_errors', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for other PEAR classes. Provides rudimentary
|
||||
@@ -214,12 +216,16 @@ class PEAR
|
||||
public function __call($method, $arguments)
|
||||
{
|
||||
if (!isset(self::$bivalentMethods[$method])) {
|
||||
trigger_error(
|
||||
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
|
||||
);
|
||||
if (PHP_VERSION_ID < 70000) {
|
||||
trigger_error(
|
||||
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
|
||||
);
|
||||
} else {
|
||||
throw new Error('Call to undefined method PEAR::' . $method . '()');
|
||||
}
|
||||
}
|
||||
return call_user_func_array(
|
||||
array(get_class(), '_' . $method),
|
||||
array(__CLASS__, '_' . $method),
|
||||
array_merge(array($this), $arguments)
|
||||
);
|
||||
}
|
||||
@@ -227,12 +233,16 @@ class PEAR
|
||||
public static function __callStatic($method, $arguments)
|
||||
{
|
||||
if (!isset(self::$bivalentMethods[$method])) {
|
||||
trigger_error(
|
||||
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
|
||||
);
|
||||
if (PHP_VERSION_ID < 70000) {
|
||||
trigger_error(
|
||||
'Call to undefined method PEAR::' . $method . '()', E_USER_ERROR
|
||||
);
|
||||
} else {
|
||||
throw new Error('Call to undefined method PEAR::' . $method . '()');
|
||||
}
|
||||
}
|
||||
return call_user_func_array(
|
||||
array(get_class(), '_' . $method),
|
||||
array(__CLASS__, '_' . $method),
|
||||
array_merge(array(null), $arguments)
|
||||
);
|
||||
}
|
||||
@@ -859,6 +869,7 @@ class PEAR_Error
|
||||
var $message = '';
|
||||
var $userinfo = '';
|
||||
var $backtrace = null;
|
||||
var $callback = null;
|
||||
|
||||
/**
|
||||
* PEAR_Error constructor
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Dummy file to make autoloaders work
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category PEAR
|
||||
* @package PEAR
|
||||
* @author Christian Weiske <cweiske@php.net>
|
||||
* @license http://opensource.org/licenses/bsd-license.php New BSD License
|
||||
* @link http://pear.php.net/package/PEAR
|
||||
*/
|
||||
require_once __DIR__ . '/../PEAR.php';
|
||||
?>
|
||||
Reference in New Issue
Block a user