]> git.agnieray.net Git - galette.git/blob - patches/laminas-db-php80.patch
183413f64ac1fba33fe803fdb45d8c482d874e68
[galette.git] / patches / laminas-db-php80.patch
1 From 7afda56a09f1274b690e60352023478f267b2575 Mon Sep 17 00:00:00 2001
2 From: Johan Cwiklinski <johan@x-tnd.be>
3 Date: Sun, 29 Nov 2020 11:10:21 +0100
4 Subject: [PATCH] Fix php8
5
6 ---
7 src/Sql/AbstractSql.php | 7 +++----
8 1 file changed, 3 insertions(+), 4 deletions(-)
9
10 diff --git a/src/Sql/AbstractSql.php b/src/Sql/AbstractSql.php
11 index 9c2f6f41..cc218d86 100644
12 --- a/src/Sql/AbstractSql.php
13 +++ b/src/Sql/AbstractSql.php
14 @@ -245,11 +245,10 @@ abstract class AbstractSql implements SqlInterface
15 if (isset($paramSpecs[$position]['combinedby'])) {
16 $multiParamValues = [];
17 foreach ($paramsForPosition as $multiParamsForPosition) {
18 - if (is_array($multiParamsForPosition)) {
19 - $ppCount = count($multiParamsForPosition);
20 - } else {
21 - $ppCount = 1;
22 + if (!is_array($multiParamsForPosition)) {
23 + $multiParamsForPosition = [$multiParamsForPosition];
24 }
25 + $ppCount = count($multiParamsForPosition);
26
27 if (! isset($paramSpecs[$position][$ppCount])) {
28 throw new Exception\RuntimeException(sprintf(
29 --
30 2.26.2
31