views:

191

answers:

2

Hello. I recently upgraded my zend framework install from 1.7 -> 1.9. Everything was working prior to the upgrade. I've managed to correct all issues except this particular one.

My problem is this. When calling values form a zend_config _ini object the standard 'Setting=Value' scheme works, as long as the setting is not an integer. If the Setting is an integer, then ZF ignores the setting and substitutes the array index for that particular entry.

Consider the following example:

[general]
;Database connection settings
db.adapter=PDO_MYSQL
db.host=localhost
db.username=dev2
db.password=***
db.dbname=dev2

[characters]
11=Tom
10=Jerry
9=Tweety

The [general] section works fine.
The [characters] section returns:
[0]=> "Tom" [1]=>"Jerry" [2]=> "Tweety"

I'm expecting (and was getting, prior to the upgrade):
[11]=> "Tom" [10]=>"Jerry" [9]=> "Tweety"

Note: I manually tested w/ php's parse_ini _file() on my config.ini and the results were what I expected, which leads me to believe that this is a ZF thang. help?

A: 

I swapped out my v1.9 Zend/Config/Ini.php with an older version form 1.7, and that resolved the problem (for now), which reaffirms my suspicion that something broke in ZF.

I went to create a bug report with zend and found that this is an existing, unresolved, issue. Bug ZF-6508.. existing since v1.8... whoops!

ispytodd
A: 

Thanks ispytodd, reverting back to the 1.7.8 version of config.php solved the same problem I was having.

I was wondering if using this older version is going to cause some other future problems, however?

Hunter