所以我通过CSS file运行了PHP CSSTidy,并进行了以下设置。
require_once './application/helpers/csstidy/class.csstidy.php';
$css = new csstidy();
$css->set_cfg('remove_last_;',TRUE);
$css->set_cfg('compress_colors',TRUE);
$css->set_cfg('template', 'highest');
$css->parse(strip_tags($content));
$content = $css->print->plain();
似乎可以正常工作,但我会收到通知两次:
Severity: Notice --> Uninitialized string offset: -1 /application/helpers/csstidy/class.csstidy.php 1035
Severity: Notice --> Uninitialized string offset: -1 /application/helpers/csstidy/class.csstidy.php 1035
这是this行。
我不知道为什么会这样,CSS是有效的...任何想法?我不想不必要地将通知/警告静音。
有什么想法吗?我错过了什么吗?