You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -966,8 +983,12 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
966
983
}
967
984
}
968
985
969
-
if (func_num_args() === 1 && is_string($column)) {
970
-
thrownewArgumentCountError(sprintf('Too few arguments to function %s("%s"), 1 passed and at least 2 expected when the 1st is a string.', __METHOD__, $column));
thrownewArgumentCountError(sprintf('Too few arguments to function %s(%s), 1 passed and at least 2 expected when the 1st is not an array or a callable', __METHOD__, var_export($column, true)));
988
+
}
989
+
990
+
if (is_float($column) || is_bool($column) || is_null($column)) {
991
+
thrownewInvalidArgumentException(sprintf('First argument of %s must be a field path as "string". Got "%s"', __METHOD__, get_debug_type($column)));
971
992
}
972
993
973
994
returnparent::where(...$params);
@@ -998,17 +1019,15 @@ protected function compileWheres(): array
998
1019
}
999
1020
1000
1021
// Convert column name to string to use as array key
1001
-
if (isset($where['column']) && $where['column'] instanceof Stringable) {
1022
+
if (isset($where['column'])) {
1002
1023
$where['column'] = (string) $where['column'];
1003
1024
}
1004
1025
1005
1026
// Convert id's.
1006
1027
if (isset($where['column']) && ($where['column'] === '_id' || str_ends_with($where['column'], '._id'))) {
0 commit comments