$_Get and &_REQUEST Index Undefined on Functions.php

You need to check if those values actually exist first.

You can use isset() for this. By adding something similar to the follow at the top of your function.

if ( isset( $_GET['page'], $_REQUEST['formaction'] ) ) {
    return;
}

http://php.net/manual/en/function.isset.php