Difference between revisions of "Issue:DPL broken in PHP 5.3.3 due to reference parameter in dplTag"

From FollowTheScore
Jump to: navigation, search
(Created page with "{{Issue |Type = Bug |Extension = DPL |Version = 1.8.9 |Description = DPL fails in PHP 5.3 due to reference parameter in dplTag |Status = open }} == Proble...")
 
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:
 
  public static function dplTag( $input, $params, &$parser ) {
 
  public static function dplTag( $input, $params, &$parser ) {
  
incorrectly has the third parameter, $parser, as a reference parameter. As a result, PHP 5.3.3 fails to match dplTag with its hook and DPL fails.
+
incorrectly has the third parameter, $parser, as a reference parameter. As a result, PHP 5.3.3 fails to match dplTag with its hook, and DPL breaks.
  
 
<pre>
 
<pre>
Line 19: Line 19:
 
</pre>
 
</pre>
  
 +
Solution: change line to:
 +
 +
public static function dplTag( $input, $params, $parser ) {
  
 
== Reply ==
 
== Reply ==

Latest revision as of 22:37, 11 April 2011

Description: DPL fails in PHP 5.3 due to reference parameter in dplTag
Extension / Version: DPL   /   1.8.9
Type / Status: Bug   /   open

Problem

This line in DPLSetup.php:

public static function dplTag( $input, $params, &$parser ) {

incorrectly has the third parameter, $parser, as a reference parameter. As a result, PHP 5.3.3 fails to match dplTag with its hook, and DPL breaks.

PHP Warning:  Parameter 3 to ExtDynamicPageList::dplTag() expected to be a reference,
value given in /path/w/includes/parser/Parser.php on line 3332

Solution: change line to:

public static function dplTag( $input, $params, $parser ) {

Reply