Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 Undefined variable: profile at YumPrivacysettingController.php #192

Open
Abdulrazak-Alkl opened this issue Aug 5, 2014 · 0 comments

Comments

@Abdulrazak-Alkl
Copy link

When i try to submit the privacy setting update form, the debugger stop at $profile->save(); because $profile is not defined. There is no YumProfile submitted from privacy/update form.

        if(isset($_POST['YumProfile'])) {
            $profile = $model->user->profile;
            $profile->attributes = $_POST['YumProfile'];
            $profile->validate();
        }

        if(!$model->hasErrors()) {
            $profile->save();
            $model->save();
            Yum::setFlash('Your privacy settings have been saved');
            $this->redirect(array('//profile/profile/view', 'id' => $model->user_id));
        }

even i don't get it, why we need to send the profile model (YumProfile) to privacy update form, if we don't use it there !? There is no relation between YumPrivacysetting and YumProfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant