PHP 5.3 problem

Tiday I upgrade to php 5.3 our debian server and this error exists Undefined index: id ($_get[‘id’])

the code is


 'expression'=>" Yii::app()->user->name==Users::model()->findbyPk(intval(".$_GET['id']."))->usr_name || ( 

Yii::app()->user->getState('type')==0  && 

Yii::app()->user->getState('company_id')==Users::model()->findbyPk(intval(".$_GET['id']."))->cmp_id )"



How can I solve this

Check the level of error_reporting in your php.ini. Obviously E_STRICT is activated. You could also change it with a ini_set() in your index.php.

hello,

or better yet, try to put an if(isset( $_GET[‘id’] )){…}; around it :)

–iM




 'expression'=>isset($_GET['id'])?" Yii::app()->user->name==Users::model()->findbyPk(intval(".$_GET['id']."))->usr_name || ( 

Yii::app()->user->getState('type')==0  && 

Yii::app()->user->getState('company_id')==Users::model()->findbyPk(intval(".$_GET['id']."))->cmp_id )":"return false;"




I was looking something like that :)