【发布时间】:2019-09-19 03:08:58
【问题描述】:
我使用 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
标签: php codeigniter preg-match