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

Bug #1633 Container::writeDatasrc() - check for methods case-sensitive w/ Patch
Submitted: 2004-06-14 04:41 UTC Modified: 2006-12-24 05:24 UTC
From: tacker Assigned: mansion
Status: Closed Package: Config
PHP Version: 4.3.5 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-06-14 04:41 UTC] tacker
Description: ------------ Container::writeDatasrc() On PHP 4 get_class_methods() returns lowered method names. The check around line 695 is case-sensitive. Suggested Changes: Index: Config/Container.php =================================================================== RCS file: /repository/pear/Config/Config/Container.php,v retrieving revision 1.32 diff -u -3 -p -u -r1.32 Container.php --- Config/Container.php 4 Jun 2004 09:57:02 -0000 1.32 +++ Config/Container.php 14 Jun 2004 09:46:58 -0000 @@ -693,7 +693,8 @@ class Config_Container { $className = $GLOBALS['CONFIG_TYPES'][$configType][1]; include_once($includeFile); - if (in_array('writeDatasrc', get_class_methods($className))) { + $writeMethodName = (version_compare(phpversion(), '5', '<')) ? 'writedatasrc' : 'writeDatasrc'; + if(in_array($writeMethodName, get_class_methods($className))) { $writer = new $className($options); return $writer->writeDatasrc($datasrc, $this); }

Comments

 [2004-06-14 06:00 UTC] bmansion at mamasam dot com
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.