Created
December 29, 2011 13:34
-
-
Save yjeroen/1534128 to your computer and use it in GitHub Desktop.
E_STRICT error in gridview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a CGridview, with a column that calls a function in the model. | |
$data->getActieveKanalen($data->id, '.$kanaal->id.', $row) | |
Today, I turned E_STRICT on, and I got the following PHP error. Before I never saw this, because only E_ALL was on. With only E_ALL, the code works without any problems.. | |
PHP Error | |
Non-static method CController::createUrl() should not be called statically, assuming $this from incompatible context | |
/data/ksa/apps/jeroen/ics/protected/models/Incident.php(319) | |
315 | |
316 if(isset($var)) | |
317 return '<div style="text-align:center"><a class="kanaalToggle" id="k-'. $kanaal_id .'-'. $this->id .'" kanaal_id="'. $kanaal_id .'" href="'. CController::createUrl('/kanaal/toggle', array('id'=>$kanaal_id, 'iid'=>$this->id)) .'"><img src="'. Yii::app()->request->baseUrl .'/images/kanaal/onicon.JPG" alt="Deactivate"/></a></div>'; | |
318 else | |
319 return '<div style="text-align:center"><a class="kanaalToggle" id="k-'. $kanaal_id .'-'. $this->id .'" kanaal_id="'. $kanaal_id .'" href="'. CController::createUrl('/kanaal/toggle', array('id'=>$kanaal_id, 'iid'=>$this->id)) .'"><img src="'. Yii::app()->request->baseUrl .'/images/kanaal/officon.JPG" alt="Activate"/></a></div>'; | |
320 } //return '<a class="kanaalToggle" id="k-'. $kanaal_id .'-'. $this->id .'" kanaal_id="'. $kanaal_id .'" incident_id="'. $this->id .'" | |
321 | |
322 | |
323 | |
324 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I faced the same problem and fixed by looking into application log. there I found the exact line number.