]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better return check in Magicsig::staticGet()
authorJames Walker <walkah@walkah.net>
Fri, 26 Feb 2010 22:52:12 +0000 (17:52 -0500)
committerJames Walker <walkah@walkah.net>
Fri, 26 Feb 2010 22:53:27 +0000 (17:53 -0500)
plugins/OStatus/classes/Magicsig.php

index d47dcf1434b0488473782d4a8f23b8bb400b4610..30da63c364ad6d2b725d3c73d7b28c325c4d8280 100644 (file)
@@ -50,7 +50,11 @@ class Magicsig extends Memcached_DataObject
     public /*static*/ function staticGet($k, $v=null)
     {
         $obj =  parent::staticGet(__CLASS__, $k, $v);
-        return Magicsig::fromString($obj->keypair);
+        if (!empty($obj)) {
+            return Magicsig::fromString($obj->keypair);
+        }
+
+        return $obj;
     }