Skip to content

Commit 52d3a32

Browse files
committed
Make the test "array is a list" a bit more robust
We are looking for an integer, excluding other numeric values (decimals, etc). As a reminder: for array keys, PHP automatically casts strings representing integers to regular integers.
1 parent ecdf459 commit 52d3a32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Database/Query.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ protected function compileBinds()
281281

282282
$binds = is_array($this->binds) ? $this->binds : [$this->binds];
283283

284-
if (is_numeric(key(array_slice($binds, 0, 1)))) {
284+
if (is_int(key(array_slice($binds, 0, 1)))) {
285285
$bindCount = count($binds);
286286
$ml = strlen($this->bindMarker);
287287

0 commit comments

Comments
 (0)