Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Db.php')
-rw-r--r--core/Db.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Db.php b/core/Db.php
index 1fd14f439b..09e99b32ce 100644
--- a/core/Db.php
+++ b/core/Db.php
@@ -817,12 +817,16 @@ class Db
Log::debug("Db::%s() executing SQL: %s", $functionName, $sql);
}
- private static function checkBoundParametersIfInDevMode($sql, $parameters = [])
+ private static function checkBoundParametersIfInDevMode($sql, $parameters)
{
if (!Development::isEnabled()) {
return;
}
+ if (!is_array($parameters)) {
+ $parameters = [$parameters];
+ }
+
foreach ($parameters as $index => $parameter) {
if ($parameter instanceof Date) {
throw new \Exception("Found bound parameter (index = $index) is Date instance which will not work correctly in following SQL: $sql");