dimis283
(Dimis283)
1
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
mikl
(Mike)
2
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.
imehesz
(Imehesz)
3
hello,
or better yet, try to put an if(isset( $_GET[‘id’] )){…}; around it 
–iM
romanoza
(Romanoza)
4
'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;"
dimis283
(Dimis283)
5
I was looking something like that 