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 a PHP8 TypeError in 10up/simple-local-avatars #695

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

kovshenin
Copy link
Contributor

There is a TypeError with PHP8 that's been fixed upstream and released in a newer version (with other changes) which we'll ship with v14. This PR backports the fix alone to v13.

See:

@kovshenin kovshenin added the dependencies Pull requests that update a dependency file label Jan 19, 2023
@kovshenin kovshenin self-assigned this Jan 19, 2023
@kovshenin kovshenin requested a review from roborourke January 19, 2023 13:14
Copy link
Contributor

@mikelittle mikelittle left a comment

Choose a reason for hiding this comment

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

I thought I saw a further fix from this (by someone at HM) as this one allows floating point numbers to pass (highly unlikely but technically possible)

@kovshenin
Copy link
Contributor Author

True, I saw your comment on the PR. Personally I wouldn't be too concerned about that as Core does:

$attachment_id = (int) $attachment_id;

Inside wp_get_attachment_url, so it shouldn't be a problem other than store a "dirty" ID in the metadata perhaps. Not sure what use case would lead to that. I don't see this as a good candidate to divert from upstream, so I'm inclined to leave as is until/unless the upstream project gets the better patch. Let me know if you strongly feel otherwise!

@owaincuvelier owaincuvelier linked an issue Jan 23, 2023 that may be closed by this pull request
Copy link
Contributor

@mikelittle mikelittle left a comment

Choose a reason for hiding this comment

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

Looks good to me

@kovshenin kovshenin merged commit c79d481 into v13-branch Jan 23, 2023
@kovshenin kovshenin deleted the fix-typeerror-simple-local-avatars branch January 23, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simple Local Avatars TypeError in PHP8
3 participants