How to add modular extension wiredesignz to codeigniter 3.0 How to add modular extension wiredesignz to codeigniter 3.0 codeigniter codeigniter

How to add modular extension wiredesignz to codeigniter 3.0


It happens because the function used in MX/Loader.php no longer exists in CodeIgniter.

You can add it back to Loader.php

protected function _ci_object_to_array($object) {    return is_object($object) ? get_object_vars($object) : $object;}

Source


Open your file application/third_party/MX/Loader.php

protected function _ci_object_to_array($object) {    return is_object($object) ? get_object_vars($object) : $object;}

add above function in Loader class.


On Line 300 of application/third_party/MX/Loader.php

This line generates an error with CI 3.1.3

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

Replace with this line.

return $this->_ci_load(array('_ci_view' => $view, '_ci_vars' => $this->_ci_prepare_view_vars($vars), '_ci_return' => $return));}