Skip to content

Instantly share code, notes, and snippets.

@pentium10
Created June 16, 2011 18:39
Show Gist options
  • Save pentium10/1029918 to your computer and use it in GitHub Desktop.
Save pentium10/1029918 to your computer and use it in GitHub Desktop.
$model = new Template('admin');
echo $model->scenario;//scenario is good
$model=$model->findByPk($id);
if ($model === null)
throw new CHttpException(404, 'The requested page does not exist.');
echo $model->scenario;//scenario is wrong
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment