php 5.3.2-1代码不能在php 5.3.8上运行

Ter*_*nal 2 php xampp yii

我的代码在ubuntu上的php 5.3.2-1中运行良好.我最近将它移植到安装了XAMPP的Windows中.它使用php 5.3.8.我收到了错误.

 Non-static method Following::getUpdates() should not be called statically, assuming $this from incompatible context
Run Code Online (Sandbox Code Playgroud)

什么是路?我应该更正我的代码来替换代码中每个地方的声明或者
是否有办法模拟旧的行为(php 5.3.2 with php.ini file)因为我不确定在纠正之后会有多少错误会被抛到我脸上它.

更新(代码示例)

public function actionIndex(){
        if(yii::app()->user->isGuest){
            $this->render('guestIndex');
        }
        else{
            $dataProvider = Following::getUpdates(yii::app()->user->id);    //genrerate data for the homepage of user i.e updates from followers
            $this->render('userIndex',array('dataProvider'=>$dataProvider));
        }


    }
Run Code Online (Sandbox Code Playgroud)

在线获取错误$dataProvider = Following::getUpdates(yii::app()->user->id); 我正在使用yii框架.

Gor*_*don 7

您的新安装可能只包含E_STRICT警告,而您之前的安装没有.引用手册:

静态调用非静态方法会生成E_STRICT级别警告.

这意味着你可以通过E_STRICT错误报告中禁用来消除警告,但IMO你应该修复有问题的代码.