mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Prevent the class from being redeclared by using class_exists.
This commit is contained in:
@@ -51,7 +51,9 @@
|
||||
$results = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "{/*/*,}/resources/classes/".$class_name.".php", GLOB_BRACE);
|
||||
//include the class
|
||||
foreach ($results as &$class_file) {
|
||||
include $class_file;
|
||||
if (!class_exists($class_name)) {
|
||||
include $class_file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user