https://bugzilla.wikimedia.org/show_bug.cgi?id=25094

           Summary: Fatal error: Call to a member function getNamespace()
                    on a non-object
                    inmediawiki/extensions/SemanticForms/includes/SF_LinkU
                    tils.php on line 169
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: SemanticForms
        AssignedTo: yaro...@gmail.com
        ReportedBy: ma...@abv.bg
                CC: wikibugs-l@lists.wikimedia.org, g.m.haged...@gmail.com


When using script/command line tools from mediawiki/maintenance/
the global $wgTitle seems not exists and scripts fails at
$wgTitle->getNamespace()  
(includes/SF_LinkUtils.php:169)

so I make small patch to skip this case (file is attached):

--- includes/SF_LinkUtils.php   (revision 72575)
+++ includes/SF_LinkUtils.php   (working copy)
@@ -166,7 +166,7 @@
               // links, even if they've since been recreated. The same might
               // hold true for other special pages.
               global $wgTitle;
-               if ( $wgTitle->getNamespace() == NS_SPECIAL )
+               if ( !$wgTitle || $wgTitle->getNamespace() == NS_SPECIAL )
                       return false;

               $store = smwfGetStore();

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to