Skip to content

Commit

Permalink
Update Connection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Oct 30, 2023
1 parent 435a335 commit e2db0b8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Illuminate/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit e2db0b8

Please sign in to comment.