propelorm / sfPropelORMPlugin

symfony 1.x plugin for Propel.
http://www.propelorm.org/
Other
109 stars 95 forks source link

Fixed issue causing persistent connection setting to not work #210

Closed pravindahal closed 11 years ago

pravindahal commented 11 years ago

Sample databases.yml has setting: persistent: true So, $options is set to ATTR_PERSISTENT => true However, in Propel.php (propel/runtime/lib/Propel.php), the code reads: private static function processDriverOptions($source, &$write_to) { foreach ($source as $option => $optiondata) { ... ...

$value = $optiondata['value']; ... ... } } This sets the $value to null (as $optiondata is true, but $optiondata['value'] evaluates to null).

So, for it to work, in databases.yml, persistence should be set as: persistent: {value: true}

I assume this has been used in several installations already. So, I fixed the code to accept both types of definitions: persistent: {value: true} and persistent: true

willdurand commented 11 years ago

The right configuration is: persistent: {value: true}, no need to change anything, except the documentation maybe.