From 88c6eee6ccbac7d4e0f452935376e5547686cfc0 Mon Sep 17 00:00:00 2001 From: Mihail Date: Tue, 4 Oct 2016 17:38:54 +0300 Subject: [PATCH] Compatibility of numeric and string keys Compatibility of numeric and string keys --- src/Propel/Runtime/Connection/PdoConnection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Propel/Runtime/Connection/PdoConnection.php b/src/Propel/Runtime/Connection/PdoConnection.php index ccbe947c9d..f883097550 100644 --- a/src/Propel/Runtime/Connection/PdoConnection.php +++ b/src/Propel/Runtime/Connection/PdoConnection.php @@ -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; } }