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

check softdelete and softrestore via hasProperty method #61

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

masiorama
Copy link

The usage of isset() raises a warning while using hasProperty() does not.
Hope il helps.

masiorama added 2 commits May 30, 2019 11:24
check _rt_softrestore with hasProperty model method to avoid warning
@drew1two
Copy link

This doesn't behave as expected. It's not evaluating the same way as isset does. Haven't had a chance to check it out further, other than the differences described in it's phpdoc. I first thought it was because _rt_softdelete and restore are declared private, but can't be that. Here's the docs

/**
* Returns a value indicating whether a property is defined for this component.
*
* A property is defined if:
*
* - the class has a getter or setter method associated with the specified name
* (in this case, property name is case-insensitive);
* - the class has a member variable with the specified name (when $checkVars is true);
* - an attached behavior has a property of the given name (when $checkBehaviors is true).

I just implemented this pull request and it stopped evaluating as true

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.

2 participants