Fix per PHP7.3 dove preg_quote aggiunge il backslash anche al carattere # (#446)

This commit is contained in:
xxfuma85xx 2019-01-19 11:39:15 +01:00 committed by Thomas Zilio
parent d315719151
commit ebbf946ea6
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class Generator
$values = array_column($replaces, 'regex');
$pattern = preg_replace('/#{1,}/', '#', $pattern);
$pattern = preg_quote($pattern, '/');
$pattern = str_replace('\\#','#',preg_quote($pattern, '/'));
$pattern = str_replace(array_keys($replaces), array_values($values), $pattern);
// Individuazione dei valori