- // Check for cookies
- if (empty($_COOKIE['visited']) || ($CONFIG['index_delay'] == 0) || ($CONFIG['index_cookie'] == 0))
- {
- if ($CONFIG['index_cookie'] > 0)
- {
- // Set cookie and remeber it for specified time
- @setcookie("visited", "true", (time() + $CONFIG['index_cookie']), COOKIE_PATH);
- }
- elseif (!empty($_COOKIE['visited']))
- {
- // Remove cookie when admin set 0 in setup
- @setcookie("visited", "", (time() - 3600), COOKIE_PATH);
- }
+// Fix missing array elements here
+if (!isConfigEntrySet('index_delay')) setConfigEntry('index_delay' , 0);
+if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0);