ZF-5606: Zend_Db::factory normalizes characters in namespace, so ZendX libraries are not found
Description
on line 240: $adapterName = strtolower($adapterNamespace . '' . $adapter); $adapterName = str_replace(' ', '', ucwords(str_replace('_', ' ', $adapterName)));
This code make ZendX_Db_Adapter_Firebird to become Zendx_Db_Adapter, which can't be found on Linux...
Also problem for user's Db libraries.
Now can be soluted by using standard inicialization without ::factory() method, but it is a bug....
Comments
Posted by Tobias Petry (ice-breaker) on 2009-03-23T16:07:57.000+0000
Have got the same problem: a self defined Db adapter has to be used, but the namespace has 3 big letters (abbreviation of the project's name)
Posted by Dariusz Sierakowski (darek_si) on 2009-09-09T13:43:50.000+0000
This my proposed for issue this bug
Posted by Ralph Schindler (ralph) on 2009-09-20T14:51:22.000+0000
Fixed in trunk in r18328 and in release 1.9 branch at 18329
Posted by Marc Peterson (marcpeterson) on 2009-09-20T19:58:11.000+0000
This patch doesn't create the adapter name properly. Say if you're using PDO_MYSQL you end up looking for Zend_Db_Adapter_PDO_MYSQL, in directory Zend/Db/Adapter/PDO/MYSQL.php. This doesn't exist in case-sensitive operating systems.
You have to strtolower() the adapter before using ucwords() on it, for example: line 247: $adapterName .= str_replace(' ', '', ucwords(strtolower(str_replace('', ' ', $adapter))));
Posted by Marc Peterson (marcpeterson) on 2009-09-20T21:52:31.000+0000
Never mind, looks like that's the whole point of this patch. Beware that there are lots of examples out there using all-uppercase adapter names in one's application.ini file. This may break a few projects.