PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Configuration » Config » Bug #920

PHP warning about array_splice

Details

Submitted2004-02-27 20:25 UTC
Fromvasilyev at math dot uchicago dot edu
Assignedmansion
StatusClosed
PackageConfig
PHP Version4.3.3
OSRedhat 9.0
Roadmaps(Not assigned)

Comments

[2004-02-27 20:25 UTC] vasilyev at math dot uchicago dot edu

Description:
------------
In Config_Container::addItem() method a call to array_splice() function will cause a warning if the section is empty and $where='top', because children property is not initialized.

PHP Warning: array_splice(): The first argument should be an array in Config/Container.php on line 149

Reproduce code:
---------------
$section =& new Config_Container('section', 'blah-blah');
$section->createDirective('blah-blah', 'blah-blah',NULL,'top');

[2004-06-04 09:47 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.