Undefined index “rest_route”
-
I got an notice, when developing with WP_DEBUG on true, so I added an isset check on
$_REQUEST['rest_route']
on line 143 / 144$call_rest_api_v2 = preg_match($regex_api_v2, $_SERVER['REQUEST_URI']) || ( isset( $_REQUEST['rest_route'] ) && preg_match($regex_api_v2, $_REQUEST['rest_route'] ) ); $call_rest_api_v1 = preg_match($regex_api_v1, $_SERVER['REQUEST_URI']) || ( isset( $_REQUEST['rest_route'] ) && preg_match($regex_api_v2, $_REQUEST['rest_route'] ) );
Else it returns a notice.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Undefined index “rest_route”’ is closed to new replies.