Skip to content

Commit e46d6d3

Browse files
committed
merging pull request #83 from AMilkov
Check if there is avatar before going into upload scenario. Otherwise the button "Upload avatar" from edit profile form generate msg: "Avatar image can not be blank"
1 parent b337bc0 commit e46d6d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

avatar/controllers/YumAvatarController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function actionEditAvatar($id = null) {
5858
if(!$model)
5959
throw new CHttpException(404);
6060

61-
if(isset($_POST['YumUser'])) {
61+
if(isset($_POST['YumUser']) && isset($_POST['YumUser']['avatar'])) {
6262
$model->attributes = $_POST['YumUser'];
6363
$model->setScenario('avatarUpload');
6464

0 commit comments

Comments
 (0)