Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable notice yii

Tags:

yii

notice

How disable notice , i try in idex.php But Notice is echo , how i can disable this .

<?
    define("YII_ENBLE_ERROR_HANDLER",false)
    define("YII_ENBLE_EXCEPTION_HANDLER",false)
?>

in php.ini

<?display_errors = off ?>
like image 236
user2420249 Avatar asked Dec 26 '22 03:12

user2420249


1 Answers

Update public/index.php

<?php
define('YII_ENABLE_ERROR_HANDLER', false);
define('YII_ENABLE_EXCEPTION_HANDLER', false);

// Turn off all error reporting
// error_reporting(0);

// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
like image 81
Valery Viktorovsky Avatar answered Jan 31 '23 00:01

Valery Viktorovsky