Skip to content

Commit

Permalink
Update Propel.php
Browse files Browse the repository at this point in the history
Fix for weird configuration bug SF3.4/Propel1.6/PropelBundle
  • Loading branch information
linde002 authored Feb 7, 2021
1 parent 88f04d7 commit 6579ddc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/lib/Propel.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,13 @@ private static function processDriverOptions($source, &$write_to)
}
$key = constant($key);

$value = $optiondata['value'];
if(is_array($optiondata)) {
$value = $optiondata['value'];
} elseif(is_string($optiondata['value'])) {
$value = $optiondata;
} else {
throw new PropelException("Invalid type for value for key: " . $key);
}
if (is_string($value) && strpos($value, '::') !== false) {
if (!defined($value)) {
throw new PropelException("Invalid PDO option/attribute value specified: " . $value);
Expand Down

0 comments on commit 6579ddc

Please sign in to comment.