I have this error when trying t activate my plugin:
Notice: Undefined index: HTTP_REFERER in /home/gateway/domains/gateway.nl/public_html/wp-content/plugins/myplugin/includes/admin/admin.php on line 48
On this line is this block:
//change upload directory
public function user_upload_files_dir($upload) {
//check if this a user-edit page
$current_page = basename($_SERVER['HTTP_REFERER']);
$current_page_tmp = explode("?", $current_page);
$current_page = $current_page_tmp[0];
if ($current_page != "user-edit.php")
return $upload;
I have done some homework but I can't understand if either my code is wrong, or it is somehow my browser refusing to give the user agent?