avenirer / CodeIgniter-MY_Model

Base model (MY_Model) for the Codeigniter framework.
324 stars 203 forks source link

error when using return_as array #263

Closed agung-wete closed 7 years ago

agung-wete commented 7 years ago

If using $this->return_as = 'array'; this line : https://github.com/avenirer/CodeIgniter-MY_Model/blob/e46328877685ccdc701249567ec352724c2a6d60/core/MY_Model.php#L914

generate error: Message: Trying to get property of non-object we need to check $row = is_array($row) ? $row[0] : $row->{0};

avenirer commented 7 years ago

thank you.