Langsung ke konten utama

Codeigniter HMVC PHP 7

 

Perbaiki Error Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Cara Memperbaikinya adalah sebagai berikut :

  1. buka folder application/third_party/MX/Router.php
  2. Berikutnya cari code function set_class, anda bisa menggunakan fasilitas pencarian di text editor yang anda gunakan, dengan menekan tombol CTRL + F, jika sudah ketemu, silahkan ubah codenya seperti dibawah ini

code sebelumnya :

Ubah menjadi seperti berikut ini :

Lalu silahkan simpan perubahannya.

 

 

Perbaiki Call to undefined method MY_Loader::_ci_object_to_array()

Berikutnya kita akan perbaiki error Call to undefined method MY_Loader::_ci_object_to_array(), langkah – langkahnya adalah sebagai berikut :

  1. Silahkan buka file application/third_party/MX/Loader.php
  2. Berikutnya cari function view (kurang lebih di line 290), lalu ubah code didalam function tersebut

Code Sebelumnya :

Menjadi seperti berikut ini :

Silahkan simpan perubahannya.

 

Sumber https://www.warungbelajar.com/cara-menerapkan-konsep-hmvc-pada-framework-codeigniter.html

Komentar

Postingan populer dari blog ini

Codeigniter 3.1.11 HMVC

 Edit file application/third_party/MX/Router.php public function set_class ( $ class ) { $ suffix = $ this -> config -> item ( 'controller_suffix' ) ; if ( strpos ( $ class , $ suffix ) === FALSE ) { $ class . = $ suffix ; } parent :: set_class ( $ class ) ; }   menjadi:   public function set_class ( $ class ) { $ suffix = $ this -> config -> item ( 'controller_suffix' ) ; if ( $ suffix && strpos ( $ class , $ suffix ) === FALSE ) //kode perubahan yang benar { $ class . = $ suffix ; } parent :: set_class ( $ class ) ; }   Dan file application/third_party/MX/Loader.php   public function view ( $ view , $ vars = array ( ) , $ return = FALSE ) { list ( $ path , $ _view ) = Modules :: find ( $ view , $ this -> _module , 'views/' ) ;   if ( $ path != FALSE ) { $ this -> _ci_view_paths = array ( $ path = > TRUE ) + $ this -> _...