Skip to content

Commit

Permalink
Merge pull request #2570 from nowackipawel/patch-82
Browse files Browse the repository at this point in the history
Model's set method should accept not only string
  • Loading branch information
MGatner authored Feb 23, 2020
2 parents 84c261d + b67db3c commit 11c6008
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,17 +493,18 @@ public function first()
//--------------------------------------------------------------------

/**
* Captures the builder's set() method so that we can validate the
* data here. This allows it to be used with any of the other
* builder methods and still get validated data, like replace.
*
* @param mixed $key
* @param string $value
* @param boolean|null $escape
* @param mixed $key Field name, or an array of field/value pairs
* @param string $value Field value, if $key is a single field
* @param boolean $escape Whether to escape values and identifiers
*
* @return $this
*/
public function set($key, string $value = '', bool $escape = null)
public function set($key, ?string $value = '', bool $escape = null)
{
$data = is_array($key)
? $key
Expand Down

0 comments on commit 11c6008

Please sign in to comment.