Difference between revisions of "Patch to LinkHoldersArray"

From FollowTheScore
Jump to: navigation, search
(Created page with "For several good reasons DPL uses an internal clone of the MediaWiki parser. In this context you may observe a '''php error message telling you that there was a problem in LinkH...")
 
 
Line 7: Line 7:
 
'''Search for the beginning of function 'merge' and add the following code lines:'''
 
'''Search for the beginning of function 'merge' and add the following code lines:'''
 
 
if (!isset($this->interwikis)) {
+
if (!isset($this->interwikis)) {
$this->internals = array();
+
    $this->internals = array();
$this->interwikis = array();
+
    $this->interwikis = array();
$this->size = 0;
+
    $this->size = 0;
$this->parent  = $other->parent;
+
    $this->parent  = $other->parent;
}
+
}
  
 
In MediaWiki 1.16.2 you have to insert this text block after line #24;  
 
In MediaWiki 1.16.2 you have to insert this text block after line #24;  
 
in other versions of MediaWiki the line number may be different.
 
in other versions of MediaWiki the line number may be different.

Latest revision as of 07:59, 5 February 2011

For several good reasons DPL uses an internal clone of the MediaWiki parser.

In this context you may observe a php error message telling you that there was a problem in LinkHoldersArray.php.

By applying the following patch to (wiki_home)/includes/parser/LinkHoldersArray.php you can fix this problem:

Search for the beginning of function 'merge' and add the following code lines:

if (!isset($this->interwikis)) {
   $this->internals = array();
   $this->interwikis = array();
   $this->size = 0;
   $this->parent  = $other->parent;
}

In MediaWiki 1.16.2 you have to insert this text block after line #24; in other versions of MediaWiki the line number may be different.