Notice: Undefined index - Parse Server < WordPress Plugin [closed]

随声附和 提交于 2019-12-04 06:57:54

问题


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...


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/48073292/notice-undefined-index-parse-server-wordpress-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!