Skip to content

Set & use missing cache group#933

Closed
carstingaxion wants to merge 2 commits intoGatherPress:mainfrom
carstingaxion:fix/missing-cache-group
Closed

Set & use missing cache group#933
carstingaxion wants to merge 2 commits intoGatherPress:mainfrom
carstingaxion:fix/missing-cache-group

Conversation

@carstingaxion
Copy link
Copy Markdown
Collaborator

@carstingaxion carstingaxion commented Oct 3, 2024

One of the errors, that came up in #931 was :

Parameter # 3 $group of function wp_cache_set expects string, int given.

in /includes/core/classes/class-rsvp.php

Until now, wp_cache_set was called with its expiration time as third parameter, which is supposed to be the cache-group.

(see https://developer.wordpress.org/reference/functions/wp_cache_set/)

Description of the Change

I thought, that it might be the easiest solution, to just use the 'default' cache-group, which was probably meant to be done here.

⚠️ Unfortunately this led to a unit test error, that I wasn't able to solve (now).

1) GatherPress\Tests\Core\Test_Rsvp::test_responses
Failed not_attending responses are empty after $user_id_2 was deleted.
Failed asserting that an array is empty.

Closes #

How to test the Change

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

Credits

Props @carstingaxion

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@carstingaxion carstingaxion added help wanted Extra attention is needed bug Something isn't working labels Oct 3, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Oct 4, 2024

Preview changes with Playground

You can preview the recent changes for PR#933 with the following PHP versions:

PHP Version 8.3

PHP Version 7.4

Download .zip with build changes

Made with 💙 from GatherPress & a little bit of WordPress Playground. Changes will not persist between sessions.

@mauteri
Copy link
Copy Markdown
Contributor

mauteri commented Oct 4, 2024

@carstingaxion we can close this, fixed it here #931

@mauteri mauteri closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants