注意:未定义索引-解析服务器< WordPress插件 [英] Notice: Undefined index - Parse Server < WordPress Plugin

查看:62
本文介绍了注意:未定义索引-解析服务器< WordPress插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个将WordPress连接到Parse Server实例的插件.当我尝试执行插件时,它抛出了以下错误:

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

这是代码...

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

推荐答案

请确保在url中传递此查询字符串变量 wp-parse-api-page ,并在代码添加条件之前使用query-字符串变量.

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.

这篇关于注意:未定义索引-解析服务器< WordPress插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆