Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.9.0

Bug #13873 Undefined Offset Error for function_exists detection
Submitted: 2008-05-11 12:44 UTC
From: mattbeale Assigned: farell
Status: Closed Package: PHP_CompatInfo (version 1.7.0)
PHP Version: 5.2.6 OS: Windows Vista SP1
Roadmaps: 1.8.0b1    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 33 - 13 = ?

 
 [2008-05-11 12:44 UTC] mattbeale (Matt Beale)
Description: ------------ Undefined Offset Error occurs while processing files containing function_exists. Tested with files from Project Beehive Forum CVS Repository (http://beehiveforum.sourceforge.net/) Test script: --------------- <?php require_once 'PHP/CompatInfo.php'; $options = array('debug' => false, // Debug mode 'recurse_dir' => true, // Recurse all directories below 'forum' 'ignore_constants' => array('E_STRICT'), // Ignored PHP 5 constant used by errorhandler.inc.php 'ignore_functions' => array('sys_get_temp_dir', 'file_put_contents'), // Ignore these functions. 'ignore_dirs' => array('.\forum\geshi', '.\forum\tiny_mce'), // Ignore Geshi and TinyMCE 'ignore_files' => array('.\forum\include\db\db_mysql.inc.php', // Ignore our DB connection scripts. '.\forum\include\db\db_mysqli.inc.php')); // We know these work on PHP4. $pci = new PHP_CompatInfo(); $res = $pci->parseFolder('forum', $options); echo sprintf("PHP Minimum Version = %s\nExtensions required : %s\n\n", $res['version'], implode(", ", $res['extensions'])); ?> Expected result: ---------------- Formatted results obtained from parseFolder() Actual result: -------------- PHP Notice: Undefined offset: 17233 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17234 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17235 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17236 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17237 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17238 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17239 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17240 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17241 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17242 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17243 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17244 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17245 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17246 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17247 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17248 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17249 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17250 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 PHP Notice: Undefined offset: 17251 in C:\PHP\PEAR\PHP\CompatInfo.php on line 885 Errors repeat indefinitely increasing offset sequentially until PHP process is terminated.

Comments

 [2008-05-12 13:27 UTC] farell (Laurent Laville)
This bug is enough critical to push a new bug fix release very soon (planned in 5 days). This bug is also for extension_loaded and defined conditional code usage.
 [2008-05-12 14:25 UTC] farell (Laurent Laville)
I would really appreciate if you can test the CVS version You need only to get the CompatInfo.php v 1.95 file Thanks in advance
 [2008-05-12 19:12 UTC] mattbeale (Matt Beale)
I can confirm this is fixed with CompatInfo.php,v 1.96 2008/05/12 14:44:48. No errors encountered and expected result returned from above example code.
 [2008-05-13 07:45 UTC] farell (Laurent Laville)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.