You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the self-closing tag (e.g. <x-component key="value" />) somehow will make the match[4] undefined in the callback function.
I tested the regex in preg_replace_callback() function and it seems the $match[4] should be empty rather than undefined in the case of using self-closing tag /> Not sure why it will throw an undefined error here.
As a temporary workaround, I have to add the ?? '' after $match[4] parameter to make it work for now. $match[4] = $this->compileComponents( $match[4] ?? '');
Might need to investigate more for a better solution to fix the problem.
It seems the self-closing tag (e.g.
<x-component key="value" />
) somehow will make thematch[4]
undefined in the callback function.I tested the regex in
preg_replace_callback()
function and it seems the$match[4]
should be empty rather than undefined in the case of using self-closing tag/>
Not sure why it will throw an undefined error here.As a temporary workaround, I have to add the
?? ''
after$match[4]
parameter to make it work for now.$match[4] = $this->compileComponents( $match[4] ?? '')
;Might need to investigate more for a better solution to fix the problem.
The text was updated successfully, but these errors were encountered: