-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Phalcon\Mvc\Model::__isset doesn't account for the PHP empty
failover
#13518
Comments
This is expected behavour by the PHP engine. The same as __set() and __get() allows you to access private/protected properties of a class if designed that way. |
I know it says it on the documentation. What I'm saying is the expected behavior would be that __isset would handle this functionality. However, it looks like it was designed to only check if relationships exist. I believe it should be updated to check the getters of protected properties as well. |
I get where you are coming from. It seems that they already have this functionallity in place in the __set if !manager->isVisibleModelProperty(this, property) {
throw new Exception("Property '" . property . "' does not have a setter.");
} But do not use it in __get or __isset. Prolly have to wait for niden or klay to respond about that decision. |
I think it is a good addition to the framework (both for However I don't want this in @phalcon/core-team Thoughts? |
@niden I would also consider changing the message. Since it is refering to a property that isnt visable the error should be simular if not the same as PHPs error for accessing private/protected properties
So changing it to |
Resolved in #14659 |
Expected and Actual Behavior
Details
php -v
)Other related info (Database, table schema):
The text was updated successfully, but these errors were encountered: