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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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