mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix fatal error when preg_split() fails on a legacy template
This commit is contained in:
parent
51762315de
commit
ee13ce551e
1 changed files with 1 additions and 1 deletions
|
|
@ -278,7 +278,7 @@ class TemplateParser_v1
|
|||
|
||||
$skip = sprintf('(?!%s)', implode('|', ['marquee']));
|
||||
$split_regex = "@(</?{$skip}[a-zA-Z](?>[^<>{}\"]+|<!--.*?-->.*?<!--.*?end-->|{[^}]*}|\"(?>'.*?'|.)*?\"|.)*?>)@s";
|
||||
$nodes = preg_split($split_regex, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$nodes = preg_split($split_regex, $content, -1, PREG_SPLIT_DELIM_CAPTURE) ?: [];
|
||||
|
||||
for($idx = 1, $node_len = count($nodes); $idx < $node_len; $idx+=2)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue