← All changes
|
vendor/wpfluent/framework/src/WPFluent/Cache/Cache.php
+4
-0
2.4.01
→
2.10.01
View file →
| @@ -84,8 +84,12 @@ | ||
| 84 | 84 | * @return mixed |
| 85 | 85 | */ |
| 86 | 86 | public static function get($key) |
| 87 | 87 | { |
| 88 | + // Initialize so wp_cache_get's by-reference $found arg doesn't | |
| 89 | + // trigger a PHP 8.1+ "writing to undefined variable" deprecation. | |
| 90 | + $found = null; | |
| 91 | + | |
| 88 | 92 | $key = static::key($key); |
| 89 | 93 | |
| 90 | 94 | if (static::isPersistent()) { |
| 91 | 95 | $value = wp_cache_get($key, static::cacheGroup(), false, $found); |