New Zenner
- Join Date:
- Apr 2011
- Location:
- Espoo, Finland
- Posts:
- 73
- Plugin Contributions:
- 0
"Undefined array key" warning in /includes/classes/cache.php
Good day,
From time to time I get the following warning in the logs:
--> PHP Warning: Undefined array key "cache_data" in /includes/classes/cache.php on line 157
$sql = "select * from " . TABLE_DB_CACHE . " where cache_entry_name = '" . $zp_cache_name . "'";
$zp_cache_result = $db->Execute($sql);
$zp_result_array = unserialize(base64_decode($zp_cache_result->fields['cache_data']));
Should this line be simply modified to:
$zp_result_array = unserialize(base64_decode($zp_cache_result->fields['cache_data'] ?? ''));
- or are there probably any issues in my (heavy modded) Zen-Cart copy?
Zen Cart 2.1.0
PHP Version: 8.3.24