]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/iomaster.php
fix local file include vulnerability in doc.php
[quix0rs-gnu-social.git] / lib / iomaster.php
index bcab3542be5af791892d949c2ec8f80074a183c3..1f6c31ee7e3a326ceda67b127c9890b7cba4277c 100644 (file)
@@ -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())
     {