Undefined index in few lines
-
Hi!
I’m playing with the plugin and it seems to work pretty well.
But in options screen the “options.php” file generates PHP “Undefined index…” error in following lines:
Undefined index: mobile_agents /hyper-cache/options.php:58 Undefined index: gzip_on_the_fly /hyper-cache/options.php:349 Undefined index: notranslation /hyper-cache/options.php:370 Undefined index: lastmodified /hyper-cache/options.php:380 Undefined index: home /hyper-cache/options.php:390 Undefined index: strip_qs /hyper-cache/options.php:417 Undefined index: cache_qs /hyper-cache/options.php:433 Undefined index: nocache /hyper-cache/options.php:448 Undefined index: reject /hyper-cache/options.php:467 Undefined index: reject_agents /hyper-cache/options.php:493 Undefined index: reject_cookies /hyper-cache/options.php:504
I’ve used isset() function in these places and it solved the problem.
So, instead of
$options['mobile_agents']
I’ve got
isset($options['mobile_agents'])
etc.
Hope it could be helpful for someone.
Cheers!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Undefined index in few lines’ is closed to new replies.