diff options
author | Evan Prodromou <evan@status.net> | 2010-01-24 16:12:40 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-24 16:12:40 -0500 |
commit | 4f213f985f292bab3d54671325954cae34c23fd3 (patch) | |
tree | 20a9463aac7eb4843f5f2c9e74dcd8ea61d4d07c /lib/iomaster.php | |
parent | 54ebb0a2b99aa1a9a6a27b61e47d12692ded65b4 (diff) | |
parent | 071f455b87cf7e322ba2ec300d6881e3b165f81c (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
lib/stompqueuemanager.php
Diffstat (limited to 'lib/iomaster.php')
-rw-r--r-- | lib/iomaster.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/iomaster.php b/lib/iomaster.php index 004e92b3e..29bd677bd 100644 --- a/lib/iomaster.php +++ b/lib/iomaster.php @@ -102,7 +102,7 @@ abstract class IoMaster */ protected function instantiate($class) { - if (isset($this->singletons[$class])) { + if (is_string($class) && isset($this->singletons[$class])) { // Already instantiated a multi-site-capable handler. // Just let it know it should listen to this site too! $this->singletons[$class]->addSite(common_config('site', 'server')); @@ -129,7 +129,11 @@ abstract class IoMaster protected function getManager($class) { - return call_user_func(array($class, 'get')); + if(is_object($class)){ + return $class; + } else { + return call_user_func(array($class, 'get')); + } } /** @@ -347,7 +351,7 @@ abstract class IoMaster * for per-queue and per-site records. * * @param string $key counter name - * @param array $owners list of owner keys like 'queue:jabber' or 'site:stat01' + * @param array $owners list of owner keys like 'queue:xmpp' or 'site:stat01' */ public function stats($key, $owners=array()) { |