Reputation: 3089
This is going to sound really stupid, but I cannot figure out why I am getting this error.
Notice: Undefined index: o in C:\inetpub\wwwroot\webres\OC_defaults.php
$o = !empty($o) ? $o : $_REQUEST['o'];
$ST_defaults["office"] = !empty($o) ? strtoupper($o) : $officeDefault;
extract($ST_defaults);
Thanks, Jatin
Upvotes: 0
Views: 88
Reputation: 21463
$_REQUEST['o'] is not set. .. a simple fix would be to add
if(!array_key_exists('o',$_REQUEST)){$_REQUEST['o']='';};
oh, also, don't use $_REQUEST, its bad practice, its lazy, where the data comes is unknown, corruption/overwriting is possible~
use $_COOKIE / $_POST / $_GET instead..
Upvotes: 2
Reputation: 2741
o
is not defined in the associative array $_REQUEST
.
You can check if it is defined by using isset($_REQUEST['o'])
.
Upvotes: 1