我使用CI_Minifier,在升级PHP后遇到了问题。
现在,当我使用preg_match
函数时,会收到错误提示。
if (!preg_match("/^[\w-:]+$/", $tag)) { #error line
$node->_[HDOM_INFO_TEXT] = '<' . $tag . $this->copy_until('<>');
if ($this->char === '<') {
$this->link_nodes($node, false);
return true;
}
if ($this->char==='>') {
$node->_[HDOM_INFO_TEXT] .= '>';
}
$this->link_nodes($node, false);
$this->char = (++$this->pos<$this->size) ? $this->doc[$this->pos] : null; // next
return true;
}
错误信息为:
编译失败:偏移量为4的字符类无效
$this->doc
元素少于4个,但$this->pos
等于4。 - B001ᛦ