summaryrefslogtreecommitdiff
path: root/lib/iomaster.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iomaster.php')
-rw-r--r--lib/iomaster.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/iomaster.php b/lib/iomaster.php
index bcab3542b..1f6c31ee7 100644
--- a/lib/iomaster.php
+++ b/lib/iomaster.php
@@ -105,7 +105,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'));
@@ -132,7 +132,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'));
+ }
}
/**
@@ -359,7 +363,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())
{