Disable notice yii

user2420249 picture user2420249 · May 26, 2013 · Viewed 13k times · Source

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 ?>

Answer

Valery Viktorovsky picture Valery Viktorovsky · May 26, 2013

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);