mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-14 19:08:25 +00:00
Fix passing null deprecation warning on CakeText::insert method
Warning message: `Deprecated (8192): preg_quote(): Passing null to parameter #1 ($str) of type string is deprecated [vendor/cakephp/cakephp/lib/Cake/Utility/CakeText.php, line 168]`
This commit is contained in:
parent
c646ba319d
commit
fa1f817be2
1 changed files with 2 additions and 2 deletions
|
@ -164,8 +164,8 @@ class CakeText {
|
|||
$format = sprintf(
|
||||
'/(?<!%s)%s%%s%s/',
|
||||
preg_quote($options['escape'], '/'),
|
||||
str_replace('%', '%%', preg_quote($options['before'], '/')),
|
||||
str_replace('%', '%%', preg_quote($options['after'], '/'))
|
||||
str_replace('%', '%%', preg_quote((string)$options['before'], '/')),
|
||||
str_replace('%', '%%', preg_quote((string)$options['after'], '/'))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue