strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

出现这个错误可能是strpos()第二个参数为int类型了,只需在前面加上(string) 将int转为string

例如

strpos('_', (string)$department->index)

六月七
请先登录后发表评论
  • latest comments
  • 总共0条评论