cargo la imagen meditante un fileField, al boton de guardar la imagen en un directorio me arroja el siguiente error,
Fatal error: Call to a member function saveAs() on null in C:\xampp\htdocs
codigo:
public function actionCreate()
{
$model=new Imageocr;
// Uncomment the following line if AJAX validation is needed
$this->performAjaxValidation($model);
$model->image=CUploadedFile::getInstance($model,'image');
if(isset($_POST['Imageocr']))
{
$model->attributes=$_POST['Imageocr'];
$model->image=CUploadedFile::getInstance($model,'image');
$model->image->saveAs('images/storage');
if($model->save())
$this->redirect(array('view','id'=>$model->idimageocr));
}
$this->render('create',array(
'model'=>$model,
));
}