• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter v4.0.4 released

#31
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
Reply

#32
Thanks CI Teams
Only Use CI4 for my works

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.