1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-06-05 22:09:38 +02:00

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

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