PMC-1418 Use of __autoload() function is deprecated since PHP 7.2
This commit is contained in:
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
use ProcessMaker\Plugins\PluginRegistry;
|
use ProcessMaker\Plugins\PluginRegistry;
|
||||||
|
|
||||||
function __autoload($sClassName)
|
spl_autoload_register(function($sClassName) {
|
||||||
{
|
|
||||||
if (!empty(config("system.workspace"))) {
|
if (!empty(config("system.workspace"))) {
|
||||||
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
|
||||||
if (file_exists($sPath . $sClassName . '.php')) {
|
if (file_exists($sPath . $sClassName . '.php')) {
|
||||||
require_once $sPath . $sClassName . '.php';
|
require_once $sPath . $sClassName . '.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
|
if (!empty(config("system.workspace")) && (!defined('PATH_DATA_SITE') || !defined('PATH_WORKSPACE'))) {
|
||||||
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
|
Bootstrap::setConstantsRelatedWs(config("system.workspace"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user