diff options
| author | Mathias <mathias@mediamixx.de> | 2022-09-22 14:29:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-22 14:29:51 +0200 |
| commit | b91c04bfcf16f54fb505111f83dacbaef156b10e (patch) | |
| tree | ddd69cdd97dea5269a7e175f98913ec24e4b7af9 /libs | |
| parent | c53342c9fc9fb00e440a00a549e4076b688c808b (diff) | |
| download | smarty-b91c04bfcf16f54fb505111f83dacbaef156b10e.tar.gz smarty-b91c04bfcf16f54fb505111f83dacbaef156b10e.tar.bz2 smarty-b91c04bfcf16f54fb505111f83dacbaef156b10e.zip | |
Fixed PHP8.1 deprecation errors passing null to parameter in trim (#807)
Fixed a PHP 8.1 deprecation error: trim(): Passing null to parameter #1 ($string) of type string is deprecated in cacheresource_keyvaluestore.php on line 247 and in cacheresource_keyvaluestore.php on line 431
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/sysplugins/smarty_cacheresource_keyvaluestore.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php index 59bf1d4a..4b1c0f6d 100644 --- a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php +++ b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php @@ -244,7 +244,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource */ protected function sanitize($string) { - $string = trim($string, '|'); + $string = trim((string)$string, '|'); if (!$string) { return ''; } @@ -428,7 +428,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource $t[] = 'IVK#COMPILE' . $_compile; } $_name .= '#'; - $cid = trim($cache_id, '|'); + $cid = trim((string)$cache_id, '|'); if (!$cid) { return $t; } |
