Use variables by reference in the foreach loops of the models

This commit is contained in:
Alex Tselegidis 2022-10-16 18:08:33 +03:00
parent 8449fd3d28
commit 5431d25f0b
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ class Categories_model extends EA_Model {
$categories = $this->db->get('categories', $limit, $offset)->result_array();
foreach ($categories as $category)
foreach ($categories as &$category)
{
$this->cast($category);
}

View file

@ -459,7 +459,7 @@ class Customers_model extends EA_Model {
->get()
->result_array();
foreach ($customers as $customer)
foreach ($customers as &$customer)
{
$this->cast($customer);
}