CodeIgniter HMVC object_to_array() error

前端 未结 5 408
陌清茗
陌清茗 2021-01-30 13:40

HMVC : https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/downloads

After downloading CI and copying over the HMVC, I\'m getting the following error:<

5条回答
  •  粉色の甜心
    2021-01-30 14:23

    Just adding this here as the Link provided by Clasyk isn't currently working...

    The short version from that thread boils down to this...

    In application/third_party/MX/Loader.php you can do the following...

    Under public function view($view, $vars = array(), $return = FALSE) Look for... (Line 300)

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

    Replace this with

    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));
    }
    

    It's the result of a "little" undocumented change that the CI Devs implemented, which is fine!

    There is a pull request on Wiredesignz awaiting action so he knows about it...

    In the meantime, you can implement the above "diddle" and get back to coding :)

提交回复
热议问题