PHP Notice: Undefined index
-
Hello,
I get a lot of “PHP Notice: Undefined index […] in [redacted]/url-params/urlparams.php on line 39” entries in debug log.
I had a look on the code and I would like to suggest a simple fix – add
isset($_REQUEST[$param])check to the condition on line 39, so it would read:if(!$return and isset($_REQUEST[$param]) and ($rawtext = $_REQUEST[$param]))
This way
$_REQUEST[$param]will be only accessed, if$paramis a valid key.Cheers,
Česlav
The topic ‘PHP Notice: Undefined index’ is closed to new replies.