dongwu3596 2017-05-08 06:16
浏览 315

将PHP更新为PHP 7后,CodeIgniter HMVC错误

After updating 5.6 to PHP 7. I was using HMVC implementation of Code Igniter and PHP upgrade started throwing following errors:-

  1. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Loader::library($library, $params = NULL, $object_name = NULL) should be compatible with CI_Loader::library($library = '', $params = NULL, $object_name = NULL)

    Filename: MX/Loader.php

    Line Number: 143

  2. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Loader::helper($helper) should be compatible with CI_Loader::helper($helpers = Array)

    Filename: MX/Loader.php

    Line Number: 0

  3. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Loader::helpers($helpers) should be compatible with CI_Loader::helpers($helpers = Array)

    Filename: MX/Loader.php

    Line Number: 0

  4. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Loader::language($langfile, $lang = '', $return = false) should be compatible with CI_Loader::language($file = Array, $lang = '')

    Filename: MX/Loader.php

    Line Number: 0

  5. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Loader::_ci_get_component($component) should be compatible with & CI_Loader::_ci_get_component($component)

    Filename: MX/Loader.php

    Line Number: 0

  6. A PHP Error was encountered Severity: Warning

    Message: Declaration of MX_Lang::load($langfile, $lang = '', $return = false, $_module = NULL) should be compatible with CI_Lang::load($langfile = '', $idiom = '', $return = false, $add_suffix = true, $alt_path = '')

    Filename: MX/Lang.php

    Line Number: 70

  7. A PHP Error was encountered Severity: Notice

    Message: Only variables should be assigned by reference

    Filename: core/Loader.php

    Line Number: 257

  • 写回答

2条回答

  • doufenzhu7012 2017-05-08 08:09
    关注

    I have fixed all issue. Bellow I have given:

     1.third_party\MX\Lang.php
        line = 134
        public function library($library = '', $params = NULL, $object_name = NULL) 
    
        2.third party\MX\Loder.php
         line=105
         pulic function helper($helper = array())
    
        3.third party\MX\Loder.php
         line=120
         pulic function helper($helper = array())
    
    
        4.third party\MX\Loder.php
         line=124
        public function language($langfile=array(), $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '') 
    
        5.third party\MX\Loder.php
         line=271
        public function  &_ci_get_component($component)
    
    
        6.third party\MX\Lang.php
         line=70
        public function load($langfile ='', $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '', $_module = '')
    
    
        7.system/core/commopn.php
         line=257
             $_config[0] =& $config;
               return $_config[0];
    
    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况