Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316499

Change subject: Fix bad pdo_options merge
......................................................................

Fix bad pdo_options merge

We need this e.g. to be able to open a sqlite connection with
ATTR_PERSISTENT = true. array_merge was re-keying the array and
using the wrong attributes.

Change-Id: I1d272377b5142785ab17a91d7664d121241a565f
---
M src/PHPQueue/Backend/PDO.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/99/316499/1

diff --git a/src/PHPQueue/Backend/PDO.php b/src/PHPQueue/Backend/PDO.php
index e3a620a..fe41689 100644
--- a/src/PHPQueue/Backend/PDO.php
+++ b/src/PHPQueue/Backend/PDO.php
@@ -39,7 +39,8 @@
             $this->db_table = $options['db_table'];
         }
         if (!empty($options['pdo_options']) && 
is_array($options['pdo_options'])) {
-            $this->pdo_options = array_merge($this->pdo_options, 
$options['pdo_options']);
+               // Use + operator instead of array_merge to preserve integer 
keys
+            $this->pdo_options = $options['pdo_options'] + $this->pdo_options;
         }
     }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/316499
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d272377b5142785ab17a91d7664d121241a565f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to