原因: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. AWESOME SWIFT-swift.libhunt.com-swift类库网站

    https://swift.libhunt.com/categories/688-events 29 Events libraries and projects ORDERED BY POPULARI ...

  2. BZOJ2005:[NOI2010]能量采集(莫比乌斯反演,欧拉函数)

    Description 栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量.在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起. 栋栋的植物种得 ...

  3. Cocos2dx打包apk时变更NDK引发问题及解决

    现在官方的Cocos Studio已经支持打包apk文件,写该随笔的时候还没试过官方的打包功能,所以就按自己的学习顺序先把打包的心得写下. 问题及最终解决方案: 其中耗时最长的问题就是ndk-r10改 ...

  4. 2018.12.31 Failed to load JavaHL Library.错误解决

    创建项目出现下面的错误 Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjava ...

  5. Java 分支结构

    Java 分支结构 - if...else/switch 顺序结构只能顺序执行,不能进行判断和选择,因此需要分支结构. Java 有两种分支结构: if 语句 switch 语句 if 语句 一个 i ...

  6. tomcat启动后报错Bad version number in .class file (unable to load class oracle.jdbc.OracleDriver)

    对于tomcat启动后报错: 错误原因:tomcat使用的jdk和eclipce的编译用的jdk版本不同. 解决办法: 1.首先确定tomcat的jdk版本: 2.点开tomcat查看jdk版本. 使 ...

  7. [译]React如何区别class和function

    原文 How Does React Tell a Class from a Function? 译注: 一分钟概览-- React最后采用了在React.Component上加入isReactComp ...

  8. JasperReport4.6生成PDF中文

    Web项目中PDF显示中文 本人无奈使用JasperReport4.6,因为这本书(好像也是唯一的一本国内的介绍JasperReport的书), 选择"文件"→New命令,弹出一个 ...

  9. WebApiClient.AOT.dll 调用api地址 -> 调用方法

    优点:简化api调用过程,WebApiClient.AOT.dll中的IHttpApi接口 缺点:只适用于内部服务之间的调用(没有验证过程) 1.继承IHttpAPi接口 public interfa ...

  10. iPhone 横竖屏切换,全屏播放的三种方式

    1. 调用系统自带的强制屏幕旋转不过还得在AppDelegate中重写下面方法 - (UIInterfaceOrientationMask)application:(UIApplication *)a ...