From e2db0b892ea11632bc1fa12c054efab0f9b9baef Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 30 Oct 2023 09:23:04 -0500 Subject: [PATCH] Update Connection.php --- src/Illuminate/Database/Connection.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Illuminate/Database/Connection.php b/src/Illuminate/Database/Connection.php index 573074802483..a46448bb8974 100755 --- a/src/Illuminate/Database/Connection.php +++ b/src/Illuminate/Database/Connection.php @@ -1102,7 +1102,7 @@ public function escape($value, $binary = false) } elseif (is_bool($value)) { return $this->escapeBool($value); } elseif (is_array($value)) { - return $this->escapeArray($value); + throw new RuntimeException('The database connection does not support escaping arrays.'); } else { if (str_contains($value, "\00")) { throw new RuntimeException('Strings with null bytes cannot be escaped. Use the binary escape option.'); @@ -1138,16 +1138,6 @@ protected function escapeBool($value) return $value ? '1' : '0'; } - /** - * Escape an array value for safe SQL embedding. - * - * @param array $value - */ - protected function escapeArray(array $value) - { - throw new RuntimeException('The database connection does not support escaping array values.'); - } - /** * Escape a binary value for safe SQL embedding. *