Last modified: 2010-09-30 13:03:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27094, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25094 - Fatal error: Call to a member function getNamespace() on a non-object inmediawiki/extensions/SemanticForms/includes/SF_LinkUtils.php on line 169
Fatal error: Call to a member function getNamespace() on a non-object inmedia...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-08 08:41 UTC by manol
Modified: 2010-09-30 13:03 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch (499 bytes, patch)
2010-09-08 08:42 UTC, manol
Details

Description manol 2010-09-08 08:41:18 UTC
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();
Comment 1 manol 2010-09-08 08:42:19 UTC
Created attachment 7678 [details]
patch
Comment 2 Yaron Koren 2010-09-30 13:03:35 UTC
Thanks for the patch; it was added in in version 2.0.1.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links