Difference between revisions of "Issue:DPL error code "DynamicPageList2.php on line 2238""

From FollowTheScore
Jump to: navigation, search
Line 37: Line 37:
 
The error should disappear if the numbers match. In addition you can try the following bug fix in the php code line 2238:
 
The error should disappear if the numbers match. In addition you can try the following bug fix in the php code line 2238:
  
  if (array_key_exists(0,$aSecLabels[$i]) && $aSecLabels[$i][0]=='#') $aMultiSecSeparators[$i] = "\n----\n";
+
  if (is_array($aSecLabels[$i]) && $aSecLabels[$i][0]=='#') $aMultiSecSeparators[$i] = "\n----\n";
  
 
[[User:Gero|Gero]] 10:29, 29 December 2007 (CET)
 
[[User:Gero|Gero]] 10:29, 29 December 2007 (CET)

Revision as of 11:48, 29 December 2007

Description: DPL error code "DynamicPageList2.php on line 2238"
Extension / Version: DPL   /   1.6.4
Type / Status: Bug   /   open

Problem

Hi Gero.

When I use some dpl queries(e.g DPL calendar or others), I will get following error code:

Notice: Uninitialized string offset: 0 in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 2238

Notice: Uninitialized string offset: 0 in D:\AppServ\www\mediawiki-1.11.0\extensions\DynamicPageList\DynamicPageList2.php on line 2238

And whether I disable the Semantic Mediawiki or not, it will always appear. What I see is just like following picture.

20071227 DPL calendar has error.png

When the same page has no DPL query, It will be normal. See following picture.

20071227 DPL calendar no error.png
  • DynamicPageList2 (version 1.6.4)
  • MediaWiki: 1.11.0
  • Win XP
  • The AppServ Open Project - 2.5.7 for Windows
    • Apache Web Server Version 2.2.3
    • PHP Script Language Version 5.1.6
    • MySQL Database Version 5.0.24a
    • phpMyAdmin Database Manager Version 2.9.0.2

Could you give me a hand?

Reply

Probably your DPL query contains more secseparator arguments than there are include sections. The error should disappear if the numbers match. In addition you can try the following bug fix in the php code line 2238:

if (is_array($aSecLabels[$i]) && $aSecLabels[$i][0]=='#') 	$aMultiSecSeparators[$i] = "\n----\n";

Gero 10:29, 29 December 2007 (CET)