我在 php 7.3 中出现了这个错误不推荐使用:strpos():非字符串指针将来会被解释为字符串。使用显式 chr() 调用来保留当前行为该行是:if ($this->Category->getPath() && strpos('_', $this->Category->getPath())) {它似乎来自这个代码: strpos('_', $this->Category->getPath()$this->Category->getPath() 可以返回这个值,例如:int(8)
string(3) "8_9"
2 回答
白猪掌柜的
TA贡献1893条经验 获得超10个赞
这对我有用
$suffix = strval($this->config->item('controller_suffix'));
$pos = !empty($suffix) ? strpos($class, $suffix) : FALSE;
if ($pos === FALSE)
{
$class .= $suffix;
}
parent::set_class($class);
- 2 回答
- 0 关注
- 245 浏览
添加回答
举报
0/150
提交
取消