admin管理员组文章数量:1296280
A PHP Error was encountered
Severity: Deprecated Notice
Message: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated
Filename: MX/Controller.php
Line Number: 46
Backtrace:
File: /Applications/XAMPP/xamppfiles/htdocs/titan/plus_app/third_party/MX/Controller.php Line: 46 Function: str_replace
File: /Applications/XAMPP/xamppfiles/htdocs/titan/plus_app/modules/home/controllers/Home.php Line: 6 Function: __construct
File: /Applications/XAMPP/xamppfiles/htdocs/titan/index.php Line: 315
Function: require_once
class MX_Controller
{
public $autoload = array();
public function __construct()
{
$class = str_replace(CI::$APP->config->item('controller_suffix'), '', get_class($this));
log_message('debug', $class." MX_Controller Initialized");
Modules::$registry[strtolower($class)] = $this;
/* copy a loader instance and initialize */
$this->load = clone load_class('Loader');
$this->load->initialize($this);
/* autoload module items */
$this->load->_autoloader($this->autoload);
}
public function __get($class)
{
return CI::$APP->$class;
}
}
A PHP Error was encountered
Severity: Deprecated Notice
Message: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated
Filename: MX/Controller.php
Line Number: 46
Backtrace:
File: /Applications/XAMPP/xamppfiles/htdocs/titan/plus_app/third_party/MX/Controller.php Line: 46 Function: str_replace
File: /Applications/XAMPP/xamppfiles/htdocs/titan/plus_app/modules/home/controllers/Home.php Line: 6 Function: __construct
File: /Applications/XAMPP/xamppfiles/htdocs/titan/index.php Line: 315
Function: require_once
class MX_Controller
{
public $autoload = array();
public function __construct()
{
$class = str_replace(CI::$APP->config->item('controller_suffix'), '', get_class($this));
log_message('debug', $class." MX_Controller Initialized");
Modules::$registry[strtolower($class)] = $this;
/* copy a loader instance and initialize */
$this->load = clone load_class('Loader');
$this->load->initialize($this);
/* autoload module items */
$this->load->_autoloader($this->autoload);
}
public function __get($class)
{
return CI::$APP->$class;
}
}
Share
Improve this question
edited Feb 19 at 14:48
TylerH
21.1k77 gold badges79 silver badges112 bronze badges
asked Feb 12 at 9:24
Oscar MgayaOscar Mgaya
11 bronze badge
4
- doublecheck if CI::$APP->config->item('controller_suffix') returns a value. The error says it returns null – Vickel Commented Feb 12 at 11:37
- What have you tried to resolve the problem? Where are you stuck? – Nico Haase Commented Feb 14 at 12:08
- CI::$APP->config->item('controller_suffix') does not return a value – Oscar Mgaya Commented Feb 17 at 9:45
- Then check why this happens. Also, please add all clarification to your question by editing it – Nico Haase Commented Feb 17 at 10:09
1 Answer
Reset to default 0Already checked CI::$APP->config->item('controller_suffix')
configuration. Is the 'controller_suffix' configuration loaded correctly?
One solution would be to create a config $config['controller_suffix'] = '';
.
本文标签: I am using Codeigniter 3 hmvc with php 82 and i am getting the below errorStack Overflow
版权声明:本文标题:I am using Codeigniter 3 hmvc with php 8.2 and i am getting the below error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741612038a2388315.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论