在 Laravel 4 中,很容易抑制 E_NOTICE 消息;我似乎无法做到这一点,因为如果我添加
In Laravel 4, it was easy enough to suppress E_NOTICE messages; I can't seem to be able to do this because if I add
error_reporting(E_ALL ^ E_NOTICE)
在任何地方它都会被覆盖.
anywhere it simply gets overridden.
这似乎发生在这里:(index.php)
This seems to happen around here: (index.php)
$response = $kernel->handle(
$request = IlluminateHttpRequest::capture()
);
我在 Exceptions/Handler.php 中添加了自定义代码来处理更多漂亮"的异常/错误视图,但我正在努力关闭通知(我根本不希望这些中的任何一个被通知触发)
I have added custom code to handle more "pretty" views of exceptions/errors within Exceptions/Handler.php but I'm struggling to switch off notices (I don't want any of these firing off with notices at all)
在 Laravel 5 中,我们可以在 AppServiceProviders::boot 里面设置 error_reporting(E_ALL ^ E_NOTICE)方法:
In Laravel 5, we can set error_reporting(E_ALL ^ E_NOTICE) inside the AppServiceProviders::boot method:
public function boot()
{
//set whatever level you want
error_reporting(E_ALL ^ E_NOTICE);
}
这篇关于Laravel 5 错误报告抑制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
按类别划分的 Magento 产品Magento products by categories(按类别划分的 Magento 产品)
资源被解释为图像但使用 MIME 类型 text/html 传输Resource interpreted as image but transferred with MIME type text/html - Magento(资源被解释为图像但使用 MIME 类型 text/html 传输 - Magen
Magento 中是否有客户帐户注册事件?Is there an event for customer account registration in Magento?(Magento 中是否有客户帐户注册事件?)
Magento addFieldToFilter:两个字段,匹配为 OR,而不是Magento addFieldToFilter: Two fields, match as OR, not AND(Magento addFieldToFilter:两个字段,匹配为 OR,而不是 AND)
“未找到错误 404"在 Magento 管理员登录页面quot;Error 404 Not Foundquot; in Magento Admin Login Page(“未找到错误 404在 Magento 管理员登录页面)
在 Magento 中获取订单增量 IDGet Order Increment Id in Magento(在 Magento 中获取订单增量 ID)