Notice: Undefined index - Parse Server < WordPr

2019-03-06 23:43发布

I'm making a plugin to connect WordPress to a Parse Server instance. When I tried to excute the plugin it threw the error below:

Notice: Undefined index: wp-parse-api-page in .../wp-content/plugins/WP-Plugin/includes/class-wp-parse-api-admin-settings.php on line 31

Here is the code...

Line 31 $_GET['wp-parse-api-page']= (int)$_GET['wp-parse-api-page'];

I would appreciate it if someone could point out what I'm missing...

2条回答
对你真心纯属浪费
2楼-- · 2019-03-07 00:21

make sure in url pass this query-string variable wp-parse-api-page and in code add condition before use query-string variable.

if(isset($_GET['wp-parse-api-page']))
   $_GET['wp-parse-api-page']= (int)$_GET['wp-parse-api-page'];  

So this warning won't come.

查看更多
做个烂人
3楼-- · 2019-03-07 00:22

You don't have the item in the array with the key wp-parse-api-page. Check your url for ?wp-parse-api-page=.

查看更多
登录 后发表回答