Fixed Entity::__isset does not return true in all cases that __get() can succeed

Xon

Well-known member
Affected version
2.0 DP10
For simple properties this works, but if __get and __set use getter/setters to push/pull to a different backing variable instead; __isset will not always return the correct result.
 
So I'm a little confused by this report, though there is something that I have changed here:
  1. The trailing "_" wasn't respected, so we detect that and change the behavior as necessary (controlling whether getters are considered).
  2. It didn't have support for the implicit getter support of get(). However, we have now removed the implicit getter support from this in favor of explicitly defining getters or using the method call directly. (I'm not aware of any places where we relied on this behavior, though a few may come up.)
You mention using __get to change the backing variable. Unless you mean one of the above things or it's custom code, I'm not following what you mean by this. If it is custom code, then the code would need to extend to changing __isset as well.

On the basis that the inconsistencies mentioned have been resolved, I'll call this fixed.
 
Top Bottom