fixes PHP 8.1
This commit is contained in:
parent
a122b67aa4
commit
7b5301b75c
2 changed files with 10 additions and 4 deletions
|
@ -238,7 +238,7 @@ class cAutoload {
|
|||
* @return (string|null) Path and filename or null
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ class cAutoload {
|
|||
*
|
||||
* @param string $className
|
||||
* @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) {
|
||||
if (class_exists($className)) {
|
||||
|
@ -256,14 +256,14 @@ class cAutoload {
|
|||
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
||||
'error' => self::ERROR_CLASS_EXISTS
|
||||
);
|
||||
return null;
|
||||
return '';
|
||||
} elseif (!is_file($filePathName)) {
|
||||
self::$_errors[] = array(
|
||||
'class' => $className,
|
||||
'file' => str_replace(self::$_conRootPath, '', $filePathName),
|
||||
'error' => self::ERROR_FILE_NOT_FOUND
|
||||
);
|
||||
return null;
|
||||
return '';
|
||||
}
|
||||
|
||||
return $filePathName;
|
||||
|
|
|
@ -194,9 +194,15 @@ function logMessage($msg, $PC_writeDir, $PC_useLog, $PC_debug) {
|
|||
}
|
||||
|
||||
function lTrimZeros($number) {
|
||||
|
||||
/*
|
||||
while ($number[0] == '0') {
|
||||
$number = substr($number, 1);
|
||||
}
|
||||
*
|
||||
*/
|
||||
|
||||
$number = intval(ltrim($number, '0'));
|
||||
return (is_numeric($number))?$number:0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue