Fail when entity->fill($data) from Array
CodeIgniter v4.0.4
Entity fill
$data = $this->request->getPost();
$user = new App\Entities\User();
$user->fill($data);
Original
CodeIgniter v4.0.4
vendor/codeigniter4/framework/system/Entity.php
Line: 118
/**
* Takes an array of key/value pairs and sets them as
* class properties, using any `setCamelCasedProperty()` methods
* that may or may not exist.
*
* @param array $data
*
* @return \CodeIgniter\Entity
*/
public function fill(array $data = null)
{
if (! is_array($data))
{
return $this;
}
foreach ($data as $key => $value)
{
$this->$key = $value;
}
return $this;
}
------------
Es:
Estoy muy agradecido, muy contento de trabajar con CI desde hace mucho tiempo, esto es un trabajo fantastico. Gracias.
En:
I am very grateful, very happy to work with CI for a long time, this is a fantastic job. Thank you