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

Fix error when use numeric for reference name #516

Closed
wants to merge 2 commits into from

Conversation

ovitores
Copy link

@ovitores ovitores commented Jan 13, 2025

Fix #512

The method ReferenceRepository::setReferenceIdentity(string $name, mixed $identity, string $class): void typed the parameter $name with string and numeric reference names is cast to integers when are recovered from ReferenceRepository::getReferenceNames($object) method in previous lines, so when pass the value of numeric name in integer with a parameter typed with string then fails.

So I propose a fix to cast names to string in ReferenceRepository::getReferenceNames($object) when are returned

@derrabus
Copy link
Member

LGTM, but we should fix this on 1.8.x.

@ovitores
Copy link
Author

ovitores commented Jan 13, 2025

LGTM, but we should fix this on 1.8.x.

Ok, create bew PR in that branch... #517

@derrabus
Copy link
Member

Closing in favor of #517 then.

@derrabus derrabus closed this Jan 13, 2025
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.

Using numerics any reference name causes error with v1.8.1
2 participants