CodeIgniter HMVC – Memperbaiki Error Message: Call to undefined method MY_Loader::_ci_object_to_array()

Untuk memperbaiki Error di atas maka :

  1. Buka application/third_party/MX/Loader.php
  2. Cari function  public function view($view, $vars = array(), $return = FALSE) Cari… (Line 300)

return $this->_ci_load(array(‘_ci_view’ => $view, ‘_ci_vars’ => $this->_ci_object_to_array($vars), ‘_ci_return’ => $return));

Ganti dengan :

if (method_exists($this, ‘_ci_object_to_array’))
{
return $this->_ci_load(array(‘_ci_view’ => $view, ‘_ci_vars’ => $this->_ci_object_to_array($vars), ‘_ci_return’ => $return));
} else {
return $this->_ci_load(array(‘_ci_view’ => $view, ‘_ci_vars’ => $this->_ci_prepare_view_vars($vars), ‘_ci_return’ => $return));
}

Selesai…

 

Referensi : http://stackoverflow.com/questions/41557760/codeigniter-hmvc-object-to-array-error

Satu pemikiran pada “CodeIgniter HMVC – Memperbaiki Error Message: Call to undefined method MY_Loader::_ci_object_to_array()

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

Connecting to %s