Update Container.php

Escaping the percent character.
This commit is contained in:
Visman 2021-01-17 20:38:29 +07:00
parent 4a59dcd938
commit 56a872bbb1

View file

@ -173,9 +173,9 @@ class Container
} else {
// partial string substitution casts value to string
$value = \preg_replace_callback(
'~%([a-z0-9_]+(?:\.[a-z0-9_]+)*)%~i',
'~\\\%|%([a-z0-9_]+(?:\.[a-z0-9_]+)*)%~i',
function ($matches) {
return $this->__get($matches[1]);
return '\\%' == $matches[0] ? '%' : $this->__get($matches[1]);
},
$value
);