فهرست منبع

Update Container.php

Escaping the percent character.
Visman 4 سال پیش
والد
کامیت
56a872bbb1
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      app/Core/Container.php

+ 2 - 2
app/Core/Container.php

@@ -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
                     );