includes/wikiformat.php
changeset 371 dc6026376919
parent 345 4ccdfeee9a11
child 407 35d94240a197
--- a/includes/wikiformat.php	Tue Jan 22 01:08:15 2008 -0500
+++ b/includes/wikiformat.php	Wed Jan 23 12:48:22 2008 -0500
@@ -119,11 +119,11 @@
 
     }
 
-    function &singleton($parser = 'Default', $rules = null)
+    public static function singleton($parser = 'Default', $rules = null)
     {
         static $only = array();
         if (!isset($only[$parser])) {
-            $ret =& Text_Wiki::factory($parser, $rules);
+            $ret = Text_Wiki::factory($parser, $rules);
             if (!$ret) {
                 return $ret;
             }
@@ -132,7 +132,7 @@
         return $only[$parser];
     }
 
-    function &factory($parser = 'Default', $rules = null)
+    public static function factory($parser = 'Default', $rules = null)
     {
         $d=getcwd();
         chdir(ENANO_ROOT);
@@ -613,7 +613,7 @@
 
     function isError(&$obj)
     {
-        return is_a($obj, 'PEAR_Error');
+        return ( @get_class($obj) == 'PEAR_Error' );
     }
 }