Last active
March 26, 2019 18:35
-
-
Save labboy0276/8bbb57b1780f20f45b96c3e1480350b7 to your computer and use it in GitHub Desktop.
temp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php | |
index f451e508fa..a32c66353b 100644 | |
--- a/core/lib/Drupal/Core/Database/Connection.php | |
+++ b/core/lib/Drupal/Core/Database/Connection.php | |
@@ -725,7 +725,7 @@ protected function expandArguments(&$query, &$args) { | |
throw new \InvalidArgumentException('Placeholders with a trailing [] can only be expanded with an array of values.'); | |
} | |
elseif (!$is_bracket_placeholder) { | |
- if ($is_array_data) { | |
+ if ($is_array_data && !empty($data)) { | |
throw new \InvalidArgumentException('Placeholders must have a trailing [] if they are to be expanded with an array of values.'); | |
} | |
// Scalar placeholder - does not need to be expanded. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment