[Bug 327326] [NEW] parse_ini_file wrong return value on failure
Robin Mehner
robin.mehner at freak-company.com
Mon Feb 9 19:03:48 GMT 2009
Public bug reported:
Binary package hint: php5
The php5 package of ubuntu seems to have patched the function
"parse_ini_file" to the state where the function returns the wrong value
on failure. Documentation of the function and it's behavior:
http://php.net/parse_ini_file
1) Ubuntu Release:
Description: Ubuntu 8.10
Release: 8.10
2) PHP Package:
apt-cache policy php5
php5:
Installiert: 5.2.6-2ubuntu4
Kandidat: 5.2.6-2ubuntu4
Versions-Tabelle:
*** 5.2.6-2ubuntu4 0
500 http://de.archive.ubuntu.com intrepid/main Packages
100 /var/lib/dpkg/status
3) Expection:
<?php
var_dump( parse_ini_file( '/this/does/not/exist' ) );
?>
should return "bool(false)"
4) Happens instead:
"array(0) {}" is returned.
The same is for parse errors (providing wrong file format).
5) cross tests:
with self compiled php and php packages of another distro (Gentoo in
this case) it works as expected.
6) test script
self-contained test script can be found in the attachment. Another one
is here: http://friendpaste.com/7KHoIbJCPCx7iDTUt6m1t0 (this simulates a
parse error)
** Affects: php5 (Ubuntu)
Importance: Undecided
Status: New
--
parse_ini_file wrong return value on failure
https://bugs.launchpad.net/bugs/327326
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list