mirror of
https://codeberg.org/vlw/scaffold.git
synced 2026-02-26 03:21:57 +01:00
fix: use func_num_args() to determine if $return should be used for Database\Model (#30)
It was not possible to set the return type explicitly as `null`, since that was the value we checked for if we should return the value of `$return` or not. We're not checking the total amount of arguments provided to check if a `$return` value was passed or not. Reviewed-on: https://codeberg.org/vlw/scaffold/pulls/30
This commit is contained in:
parent
2d55d954a1
commit
71a9f12b02
1 changed files with 1 additions and 1 deletions
|
|
@ -109,6 +109,6 @@
|
|||
->where($this->where)
|
||||
->update([$key => $value]);
|
||||
|
||||
return $return ?? $value;
|
||||
return func_num_args() === 2 ? $value : $return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue