Fix For PHP 5.4.x compatibility when PMPluginRegstry singleton is loaded from serialized file
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
* bootstrap - ProcessMaker Bootstrap
|
||||
* this file is used initialize main variables, redirect and dispatch all requests
|
||||
*/
|
||||
|
||||
|
||||
//session_cache_limiter('none');
|
||||
//die('neyek');
|
||||
function transactionLog($transactionName){
|
||||
if (extension_loaded('newrelic')) {
|
||||
$baseName="ProcessMaker";
|
||||
@@ -609,12 +609,13 @@ Bootstrap::LoadClass( 'plugin' );
|
||||
//here we are loading all plugins registered
|
||||
//the singleton has a list of enabled plugins
|
||||
$sSerializedFile = PATH_DATA_SITE . 'plugin.singleton';
|
||||
$oPluginRegistry = & PMPluginRegistry::getSingleton();
|
||||
|
||||
if (file_exists( $sSerializedFile )) {
|
||||
$oPluginRegistry->unSerializeInstance( file_get_contents( $sSerializedFile ) );
|
||||
$oPluginRegistry = PMPluginRegistry::loadSingleton($sSerializedFile);
|
||||
$attributes = $oPluginRegistry->getAttributes();
|
||||
Bootstrap::LoadTranslationPlugins( defined( 'SYS_LANG' ) ? SYS_LANG : "en" , $attributes);
|
||||
} else{
|
||||
$oPluginRegistry = PMPluginRegistry::getSingleton();
|
||||
}
|
||||
|
||||
// setup propel definitions and logging
|
||||
|
||||
Reference in New Issue
Block a user