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

Remove undefined index for set_value(falsy value) #84

Merged
merged 1 commit into from Jul 1, 2015
Merged

Remove undefined index for set_value(falsy value) #84

merged 1 commit into from Jul 1, 2015

Conversation

carlfredrikhero
Copy link
Member

If set_value is called with a falsy value (false, 0, null etc), $this->values gets an empty array.

But the __get assumes that there is at least one value (return $attribute[0] on line 276). This results in an "undefined index" error.

Adding a check for empty array fixes this.

If set_value is called with a falsy value (false, 0, null etc), $this->values gets an empty array.

But the __get assumes that there is at least one value (return $attribute[0] on line 276). This results in an "undefined index" error.

Adding a check for empty array fixes this.
daviferreira added a commit that referenced this pull request Jul 1, 2015
Remove undefined index for set_value(falsy value)
@daviferreira daviferreira merged commit 86ef621 into podio-community:master Jul 1, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants