invalid range in character class at offset 11
/wp-content/plugins/js_composer/include/autoload/hook-vc-grid.php on line 163
line 86(86行)
旧:
. ‘([\\w-_]+)’ // 2: Shortcode name
改为:
. ‘([\\w\-_]+)’ // 2: Shortcode name
w后面增加了\
因为PHP版本的提高,所有连字符’–‘(不作为范围字符使用)应该转义,’–‘从PHP 7.3将不再被视为范围字符。
(顺便87行w-也改为w\-)
修改完83-91行
private function getShortcodeRegexForId() {
return ‘\\[‘ // Opening bracket
. ‘(\\[?)’ // 1: Optional second opening bracket for escaping shortcodes: [[tag]]
. ‘([\\w\-_]+)’ // 2: Shortcode name
. ‘(?![\\w\-])’ // Not followed by word character or hyphen
. ‘(‘ // 3: Unroll the loop: Inside the opening shortcode tag
. ‘[^\\]\\/]*’ // Not a closing bracket or forward slash
. ‘(?:’ . ‘\\/(?!\\])’ // A forward slash not followed by a closing bracket
. ‘[^\\]\\/]*’ // Not a closing bracket or forward slash