Page MenuHomePhabricator

Fatal error: Call to a member function getNamespace() on a non-object inmediawiki/extensions/SemanticForms/includes/SF_LinkUtils.php on line 169
Closed, ResolvedPublic

Description

Author: manol

Description:
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();

Version: unspecified
Severity: normal

Details

Reference
bz25094

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:14 PM
bzimport set Reference to bz25094.

manol wrote:

patch

Attached:

Thanks for the patch; it was added in in version 2.0.1.