原因:drupal默认使用E_ALL,即输出所有错误和警告。我们只需要修改错误显示级别即可。

方法:

1. 打开\sites\default\settings.php 追加一行

ini_set('error_reporting', 'E_ALL ^ E_NOTICE');

这句话的意思是输出除了所有警告的所有错误。

注意该文件是只读的,要先修改文件权限。

2. 进到drupal后台,#overlay=admin/config/development/logging,将Error messages to display下面的选项从"All messages"改为"Errors and warnings"。

参考:http://www.citytree.be/blog/undefined-index-quick-fix-in-drupal7-error-reporting

屏蔽Drupal中的“Notice: Undefined index”警告的更多相关文章

  1. PHP中出现Notice: Undefined index的三种解决办法

    前一段做的一个PHP程序在服务器运行正常,被别人拿到本机测试的时候总是出现“Notice: Undefined index:”这样的警告,这只是一个因为PHP版本不同而产生的警告(NOTICE或者WA ...

  2. wordpress5.0+中 Notice: Undefined index: HTTP_REFERER 问题解决

    都说现在搭网站很简单了,但真遇到问题了还真不一定能解决. 这次搭建的网站是用的wordpress版本5.0.4,以为操作和以前的低版本一样,结果做出来还是遇到问题了. 网站搭好后,首页总在顶端出现一行 ...

  3. php提示Notice: Undefined index解决方法

    php提示Notice: Undefined index问题,Undefined index:是指你的代码里存在:“变量还未定义.赋值就使用”的错误,这个不是致命错误,不会让你的php代码运行强行中止 ...

  4. Notice: Undefined index: wjs_cookie

    w执行顺序. ok <!doctype html> <html> <head> <meta charset="UTF-8"> < ...

  5. Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9

    原文:Notice: Undefined index: user in D:\phpStudy\WWW\js\ls\lsmc\php\add.php on line 9 (初用数据库(mysql)做用 ...

  6. PHP Notice: Undefined index:解决方法

    PHP Notice:  Undefined index:解决方法 PHP Notice: Undefined index: 解决方法 <pre> if (empty(swoole_get ...

  7. ***PHP Notice: Undefined index: ..问题的解决方法

    首先,这个不是错误,是warning.所以如果服务器不能改,每个变量使用前应当先定义. 方法1:服务器配置修改     修改php.ini配置文件,error_reporting = E_ALL &a ...

  8. 为什么会出现Notice: Undefined index: submit in D:\xampp\htdocs\test.php on line 19

    事例如下": <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:/ ...

  9. Testlink安装:Notice:Undefined index: type in C:\inetpub\wwwroot\testlink-1.9.3\install\installCheck.php on line 41

    问题现象:

随机推荐

  1. 使用ViewPager和FragmentPagerAdapter实现Tab

    前面我们分别利用ViewPager和Fragment实现了Tab效果.但是使用Fragment实现的Tab不能够左右滑动.如果我们既想使用Fragment又想让Tab能够滑动,那么怎么办呢?这 就是今 ...

  2. linux解压eclipse启动时无法找到jre环境的解决办法

    使用软链接的方法: 1.打开终端进入到eclipse安装主目录下:mkdir jre 2.cd jre 3.ln -s /home/zhoushuo/app/jdk1.8.0_102/bin bin

  3. Yii 日志组件

    详细的介绍查看官网的document:http://www.yiiframework.com/doc/guide/1.1/en/topics.logging 也可以看 Yii 1.1 Applicat ...

  4. UVa 1636 - Headshot(概率)

    链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  5. es6之decorator

    //decorator //第三方库为:core-decorators //以下为代码实例 { //decorator //修饰器是一个函数 //是修改一个行为 //修改一个类的行为 console. ...

  6. FreeMarker之根据模型生成HTML代码

    FreeMarker之根据模型生成HTML代码与FreeMarker根据模型生成Java代码,本质上是一样的,关于生成Java代码可以参考我的这篇文章:FreeMarker之根据模板生成Java代码 ...

  7. POST接口底层方法

    对于POST请求的接口,我们如何调用它获取到数据,这其中自然少不了底层代码 底层公共类的书写 public class ThirdOpenAPIService { public static Thir ...

  8. java使用Redis(六个类型)

    下载插件:https://mvnrepository.com/artifact/redis.clients/jedis/3.0.0 maven项目依赖: <dependency> < ...

  9. 【SPJ6285 NGM2 - Another Game With Numbers】 题解

    题目链接:https://www.luogu.org/problemnew/show/SP6285 唉好久之前校内模拟赛的题目 嘴上说着明白但是实现起来我的位运算太丑陋了啊! #include < ...

  10. 【转】优秀的Java程序员必须了解GC的工作原理

    一个优秀的Java程序员必须了解GC的工作原理.如何优化GC的性能.如何与GC进行有限的交互,因为有一些应用程序对性能要求较高,例如嵌入式系统.实时系统等,只有全面提升内存的管理效率 ,才能提高整个应 ...