From:             wolf at exitec dot de
Operating system: Apache 2.0
PHP version:      4.3.8
PHP Bug Type:     Filesystem function related
Bug description:  wrong paragraph handling

Description:
------------
the parse_ini_file doesn't work as in older php-versions:

the paragraph starting with 0... (for example 0815) wasn't handled
correctly.

please create the following test.ini file

[01]
e=e
f=f
[02]
g=g
h=h
[1]
a=a
b=b
[2]
c=c
d=d
[0815]
bla=bla

Reproduce code:
---------------
print_r(parse_ini_file("test.ini",true));



Expected result:
----------------
Array
(
    [01] => Array
        (
            [e] => e
            [f] => f
        )

    [02] => Array
        (
            [g] => g
            [h] => h
        )

    [1] => Array
        (
            [a] => a
            [b] => b
        )

    [2] => Array
        (
            [c] => c
            [d] => d
        )

    [0815] => Array
        (
            [bla] => bla
        )

)

Actual result:
--------------
Array
(
    [1] => Array
        (
            [a] => a
            [b] => b
        )

    [2] => Array
        (
            [c] => c
            [d] => d
        )

    [0] => Array
        (
            [bla] => bla
        )

)


-- 
Edit bug report at http://bugs.php.net/?id=29306&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29306&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29306&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29306&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29306&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29306&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29306&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29306&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29306&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29306&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29306&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29306&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29306&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29306&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29306&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29306&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29306&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29306&r=float

Reply via email to