Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Prevent infinite loop in PropertyMetadata#20146

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@wesleylancel
Copy link
Contributor

QA
Branch?3.1
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

This commit fixes a possible infinite loop in PropertyMetadata when the PropertyMetadata class was constructed with an existing property of class and later used (after being serialized and cached) on that same class while that property no longer existing.get_parent_class will return false when there is no parent class andproperty_existing will then keeping return false causing thewhile loop to be infinite.

veloxy reacted with thumbs up emoji
@wesleylancelwesleylancel changed the titlePrevent infinite loop in PropertyMetadata[Validator] Prevent infinite loop in PropertyMetadataOct 4, 2016
if (false ===$objectOrClassName) {
thrownewValidatorException(
sprintf('Property "%s" does not exist in class "%s"',$this->getName(),$originalClass)
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Should be on one line

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@fabpot Fixed.

@xabbuh
Copy link
Member

👍

@fabpot
Copy link
Member

Thank you@wesleylancel.

fabpot added a commit that referenced this pull requestOct 13, 2016
…leylancel)This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes#20146).Discussion----------[Validator] Prevent infinite loop in PropertyMetadata| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |n/a| License       | MIT| Doc PR        | n/aThis commit fixes a possible infinite loop in PropertyMetadata when the PropertyMetadata class was constructed with an existing property of class and later used (after being serialized and cached) on that same class while that property no longer existing. `get_parent_class` will return false when there is no parent class and `property_existing` will then keeping return false causing the `while` loop to be infinite.Commits-------c1ae7b6 Prevent infinite loop in PropertyMetadata
@fabpotfabpot closed thisOct 13, 2016
This was referencedOct 27, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@wesleylancel@xabbuh@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp