Dieser Commit ist enthalten in:
Ortwin Pinke 2022-01-27 21:58:47 +01:00
Ursprung a122b67aa4
Commit 7b5301b75c
2 geänderte Dateien mit 10 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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;

Datei anzeigen

@ -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;
}