Skip to content

Commit

Permalink
Compatibility of numeric and string keys (#1279)
Browse files Browse the repository at this point in the history
Compatibility of numeric and string keys
  • Loading branch information
userator authored and marcj committed Oct 15, 2016
1 parent 4641d27 commit 58d57ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Propel/Runtime/Connection/PdoConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public function __construct($dsn, $user = null, $password = null, array $options
$pdoOptions = [];
if (is_array($options)) {
foreach ($options as $key => $option) {
$pdoOptions[constant('self::' . $key)] = $option;
$index = (is_numeric($key)) ? $key : constant('self::' . $key);
$pdoOptions[$index] = $option;
}
}

Expand Down

0 comments on commit 58d57ad

Please sign in to comment.