Skip to content

Commit 11c6008

Browse files
authored
Merge pull request #2570 from nowackipawel/patch-82
Model's set method should accept not only string
2 parents 84c261d + b67db3c commit 11c6008

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

system/Model.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,17 +493,18 @@ public function first()
493493
//--------------------------------------------------------------------
494494

495495
/**
496+
496497
* Captures the builder's set() method so that we can validate the
497498
* data here. This allows it to be used with any of the other
498499
* builder methods and still get validated data, like replace.
499500
*
500-
* @param mixed $key
501-
* @param string $value
502-
* @param boolean|null $escape
501+
* @param mixed $key Field name, or an array of field/value pairs
502+
* @param string $value Field value, if $key is a single field
503+
* @param boolean $escape Whether to escape values and identifiers
503504
*
504505
* @return $this
505506
*/
506-
public function set($key, string $value = '', bool $escape = null)
507+
public function set($key, ?string $value = '', bool $escape = null)
507508
{
508509
$data = is_array($key)
509510
? $key

0 commit comments

Comments
 (0)