Issue:Could not be converted to int

From FollowTheScore
Jump to: navigation, search
Description: Bug in DynamicPageList2.php
Extension / Version: Calendar   /   1.0
Type / Status: Bug   /   open

Problem

I installed the latest DPL Calendar on my test wiki, and after importing all the proper pages thru XML like instructed; I get the following error repeated 30 times at the top of the page:

Notice: Object of class ExtParserFunctions could not be converted to int in WIKIPATH/extensions/DynamicPageList/DynamicPageList2.php on line 2095

See the problem for yourself at: http://opensv.ch/mediawiki/index.php?title=Current_events XApple 02:52, 12 January 2008 (CET)

What is going wrong ? Thanks for any answers !

Reply

So far I never observed that error. The reason is probably that your php version is too old (< 4.2). Please remove the second part of the if statement in the php code and check whether it works then. Generally I would recommend to update your php interpreter. Gero 21:05, 16 January 2008 (CET)

That's not it, I'm running PHP 5.1.4. I have made a file containing "<?php phpinfo() ?>" here so you can see for yourself. XApple 18:07, 18 January 2008 (CET)
Then try to remove the second part of the logical expression:
   if (!isset($wgHooks['ParserAfterTidy']) ||
       !( in_array( __CLASS__ . '::endReset',$wgHooks['ParserAfterTidy']) ||
          in_array( array(__CLASS__, 'endReset' ),$wgHooks['ParserAfterTidy']) ) ) {
   ....
   if (!isset($wgHooks['ParserAfterTidy']) ||
       !( in_array( __CLASS__ . '::endReset',$wgHooks['ParserAfterTidy']) ) ) {
   ...
Well that seams to have solved the issue. Thanks a lot. I just hope the removal of that line hasn't affected the good functioning of the code... XApple 00:08, 20 January 2008 (CET)

I'm seeing the same problem. Also running a recent PHP - version 5.1.2. Problem appeared when upgrading from MediaWiki 1.10 to 1.11. Jlerner 04:34, 28 February 2008 (CET)

I get this too when running refreshLinks.php maintenance script. We're running PHP 5.1.6 upgrading to MediaWiki 1.11.1 It's just a "Notice" (as opposed to error or warning) so I'm assuming this is not a critical bug. But then again it would be nice to know this for sure? --Maxelrod 04:31, 10 March 2008 (CET)