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

Add an early return filter for get_upload_dir() #1008

Merged
merged 12 commits into from
Nov 22, 2024

Conversation

mattwiebe
Copy link
Contributor

Our use of wp_upload_dir() in Activitypub\get_upload_baseurl() was creating PHP warnings on dotcom due to its internal use of wp_mkdir_p() which fails there.

Fixes #

Proposed changes:

  • add a pre_activitypub_get_upload_baseurl filter to bypass the use of wp_upload_dir()

@mattwiebe mattwiebe requested a review from pfefferle November 21, 2024 21:31
@mattwiebe mattwiebe self-assigned this Nov 21, 2024
includes/functions.php Outdated Show resolved Hide resolved
@pfefferle
Copy link
Member

@mattwiebe you also have to add the changelog entry to the readme.txt, then the tests are green!

includes/functions.php Outdated Show resolved Hide resolved
@github-actions github-actions bot added the Docs label Nov 21, 2024
@mattwiebe
Copy link
Contributor Author

@mattwiebe you also have to add the changelog entry to the readme.txt, then the tests are green!

It does not like me 😆

@mattwiebe
Copy link
Contributor Author

We could also probably just scrap the regular filter entirely. I doubt anyone was using it, since it was just for us.

pfefferle
pfefferle previously approved these changes Nov 22, 2024
Copy link
Member

@pfefferle pfefferle left a comment

Choose a reason for hiding this comment

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

It seems that you accidentally bring back a lot of readme stuff!

I quickly fixed it

@mattwiebe
Copy link
Contributor Author

I quickly fixed it

Thanks! The conflict resolution thing here was acting all kinds of weird for me

@mattwiebe mattwiebe merged commit 7b5cf68 into trunk Nov 22, 2024
22 checks passed
@mattwiebe mattwiebe deleted the add/early-return-filter-for-upload-dir branch November 22, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants