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

empty() behaviour in Filter properties #33

Open
nohponex opened this issue Apr 21, 2016 · 0 comments
Open

empty() behaviour in Filter properties #33

nohponex opened this issue Apr 21, 2016 · 0 comments
Labels

Comments

@nohponex
Copy link
Member

empty($filter->primary) is not working as expected, same applies for classes with magic properties

Solution:

https://stackoverflow.com/questions/2045791/php-empty-on-get-accessor

Based on a reading of the empty's manual page and comments (Ctrl-F for isset and/or double underscores), it looks like this is known behavior, and if you want your __set and __get methods and empty to play nice together, there's an implicit assumption that you implement a __isset magic method as well.

@nohponex nohponex added the bug label Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant