Commit fc82ef75 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #262 in ZP/z-push from bugfix/ZP-943-make-shared-memory-default-ipc to develop

* commit '46c25ac4':
  ZP-943 Before trying to autoload a IPC provider class, check if the file exists.
parents 97a6ae6c 46c25ac4
...@@ -48,7 +48,10 @@ abstract class InterProcessData { ...@@ -48,7 +48,10 @@ abstract class InterProcessData {
// Defines which IPC provider to load, first has preference // Defines which IPC provider to load, first has preference
// if IPC_PROVIDER in the main config is set, that class will be loaded // if IPC_PROVIDER in the main config is set, that class will be loaded
static private $providerLoadOrder = array('IpcSharedMemoryProvider', 'IpcMemcachedProvider'); static private $providerLoadOrder = array(
'IpcSharedMemoryProvider' => 'backend/ipcsharedmemory/ipcsharedmemoryprovider.php',
'IpcMemcachedProvider' => 'backend/ipcmemcached/ipcmemcachedprovider.php',
);
static protected $devid; static protected $devid;
static protected $pid; static protected $pid;
static protected $user; static protected $user;
...@@ -73,8 +76,8 @@ abstract class InterProcessData { ...@@ -73,8 +76,8 @@ abstract class InterProcessData {
$this->provider_class = defined('IPC_PROVIDER') ? IPC_PROVIDER : false; $this->provider_class = defined('IPC_PROVIDER') ? IPC_PROVIDER : false;
if (!$this->provider_class) { if (!$this->provider_class) {
foreach(self::$providerLoadOrder as $provider) { foreach(self::$providerLoadOrder as $provider => $file) {
if (class_exists($provider)) { if (file_exists($file) && class_exists($provider)) {
$this->provider_class = $provider; $this->provider_class = $provider;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment