fixes PHP 8.1
Dieser Commit ist enthalten in:
Ursprung
a122b67aa4
Commit
7b5301b75c
|
@ -238,7 +238,7 @@ class cAutoload {
|
||||||
* @return (string|null) Path and filename or null
|
* @return (string|null) Path and filename or null
|
||||||
*/
|
*/
|
||||||
private static function _getContenidoClassFile($className) {
|
private static function _getContenidoClassFile($className) {
|
||||||
$file = isset(self::$_includeFiles[$className]) ? self::$_conRootPath . self::$_includeFiles[$className] : null;
|
$file = isset(self::$_includeFiles[$className]) ? self::$_conRootPath . self::$_includeFiles[$className] : '';
|
||||||
return self::_validateClassAndFile($className, $file);
|
return self::_validateClassAndFile($className, $file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ class cAutoload {
|
||||||
*
|
*
|
||||||
* @param string $className
|
* @param string $className
|
||||||
* @param string $filePathName
|
* @param string $filePathName
|
||||||
* @return (string|null) The file if validation was successfull, otherwhise null
|
* @return (string) The file if validation was successfull, otherwhise empty
|
||||||
*/
|
*/
|
||||||
private static function _validateClassAndFile($className, $filePathName) {
|
private static function _validateClassAndFile($className, $filePathName) {
|
||||||
if (class_exists($className)) {
|
if (class_exists($className)) {
|
||||||
|
@ -256,14 +256,14 @@ class cAutoload {
|
||||||
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
||||||
'error' => self::ERROR_CLASS_EXISTS
|
'error' => self::ERROR_CLASS_EXISTS
|
||||||
);
|
);
|
||||||
return null;
|
return '';
|
||||||
} elseif (!is_file($filePathName)) {
|
} elseif (!is_file($filePathName)) {
|
||||||
self::$_errors[] = array(
|
self::$_errors[] = array(
|
||||||
'class' => $className,
|
'class' => $className,
|
||||||
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
||||||
'error' => self::ERROR_FILE_NOT_FOUND
|
'error' => self::ERROR_FILE_NOT_FOUND
|
||||||
);
|
);
|
||||||
return null;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $filePathName;
|
return $filePathName;
|
||||||
|
|
|
@ -194,9 +194,15 @@ function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function lTrimZeros($number) {
|
function lTrimZeros($number) {
|
||||||
|
|
||||||
|
/*
|
||||||
while ($number[0] == '0') {
|
while ($number[0] == '0') {
|
||||||
$number = substr($number, 1);
|
$number = substr($number, 1);
|
||||||
}
|
}
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$number = intval(ltrim($number, '0'));
|
||||||
return (is_numeric($number))?$number:0;
|
return (is_numeric($number))?$number:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Laden…
In neuem Issue referenzieren