[Bug 327326] [NEW] parse_ini_file wrong return value on failure

2009-02-09 Thread Robin Mehner
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:



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
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 327326] Re: parse_ini_file wrong return value on failure

2009-02-09 Thread Robin Mehner

** Attachment added: "parse_ini_file with non existing file"
   http://launchpadlibrarian.net/22420657/ubuntu-php-parse_ini_file1.php

-- 
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
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 327326] Re: parse_ini_file wrong return value on failure

2009-02-09 Thread Robin Mehner
parse_ini_file with parse error (script mentioned with the link above)

** Attachment added: "parse_ini_file with parse error"
   http://launchpadlibrarian.net/22420683/ubuntu-php-parse_ini_file2.php

-- 
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
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 327326] Re: parse_ini_file wrong return value on failure

2009-02-10 Thread Robin Mehner
I'm using 8.10 with arch amd64 but if necessary I can test it with x86
too. Thanks for taking the time.

-- 
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
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs