mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2025-03-13 07:33:07 +01:00
LSsession :: includeFile : fix using LSlog when is not already load
Only log errors and use error_log() if LSlog is not loaded.
This commit is contained in:
parent
5474cd2315
commit
f8fa2e3d69
1 changed files with 10 additions and 3 deletions
|
@ -108,16 +108,23 @@ class LSsession {
|
||||||
if ($path[0] != '/') {
|
if ($path[0] != '/') {
|
||||||
$found = stream_resolve_include_path($path);
|
$found = stream_resolve_include_path($path);
|
||||||
if ($found === false) {
|
if ($found === false) {
|
||||||
LSlog :: debug("includeFile($file, external=$external) : file $path not found in include path.");
|
$log_msg = "includeFile($file, external=$external) : file $path not found in include path.";
|
||||||
|
if (class_exists('LSlog'))
|
||||||
|
LSlog :: warning($log_msg);
|
||||||
|
else
|
||||||
|
error_log($log_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LSlog :: debug("includeFile($file, external=$external) : file '$path' found in include path as '$found'.");
|
|
||||||
$path = $found;
|
$path = $found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!file_exists($path)) {
|
else if (!file_exists($path)) {
|
||||||
LSlog :: debug("includeFile($file, external=$external) : file not found ($local_path / $path)");
|
$log_msg = "includeFile($file, external=$external) : file not found ($local_path / $path)";
|
||||||
|
if (class_exists('LSlog'))
|
||||||
|
LSlog :: warning($log_msg);
|
||||||
|
else
|
||||||
|
error_log($log_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return include_once($path);
|
return include_once($path);
|
||||||
|
|
Loading…
Add table
Reference in a new issue