Skip to content

Commit 2d99c24

Browse files
committed
fix: improve exception message
1 parent 2ffbbbb commit 2d99c24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

system/BaseModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ public function insertBatch(?array $set = null, ?bool $escape = null, int $batch
900900
public function update($id = null, $data = null): bool
901901
{
902902
if (is_bool($id)) {
903-
throw new InvalidArgumentException('$id should not be boolean.');
903+
throw new InvalidArgumentException('update(): argument #1 ($id) should not be boolean.');
904904
}
905905

906906
if (is_numeric($id) || is_string($id)) {

tests/system/Models/UpdateModelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public function provideInvalidIds(): Generator
409409
[
410410
false,
411411
InvalidArgumentException::class,
412-
'$id should not be boolean.',
412+
'update(): argument #1 ($id) should not be boolean.',
413413
],
414414
];
415415
}

0 commit comments

Comments
 (0)