Auto Loader [Class]: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-05-10 22:39:48 +00:00
parent c894161060
commit 6d4463a5b7
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class auto_loader {
//third priority
$path = $_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/app/".$class_name."/resources/classes/".$class_name.".php";
$class_found = true;
if ($_REQUEST['debug'] == 'true') {
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
syslog(LOG_WARNING, "[php][autoloader] name: ".$class_name.", path: ".$path.", line: ".__line__);
}
include $path;
@ -81,7 +81,7 @@ class auto_loader {
foreach ($results as &$class_file) {
if (!$class_found) {
$class_found = true;
if ($_REQUEST['debug'] == 'true') {
if (!empty($_REQUEST['debug']) && $_REQUEST['debug'] == 'true') {
syslog(LOG_WARNING, "[php][autoloader] name: ".$class_name.", path: ".$class_file.", line: ".__line__);
}
include $class_file;