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

Replace unlink with wp_delete_file #7732

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

donnapep
Copy link
Collaborator

@donnapep donnapep commented Jan 13, 2025

Resolves https://github.com/Automattic/sensei-security/issues/25.

Proposed Changes

Switch to using wp_delete_file instead of unlink.

Testing Instructions

  1. Browse to Sensei LMS > Tools.
  2. Visit the Export Content tool.
  3. Export courses.
  4. In your /var/tmp folder, ensure there are no files starting with sensei-lms-export with today's date.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • Code is tested on the minimum supported PHP and WordPress versions

@donnapep donnapep added this to the 4.24.5 milestone Jan 13, 2025
Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep donnapep self-assigned this Jan 13, 2025
Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep donnapep requested review from m1r0 and merkushin January 13, 2025 20:09
Copy link
Member

@merkushin merkushin left a comment

Choose a reason for hiding this comment

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

👍

@donnapep donnapep merged commit cd4e022 into trunk Jan 14, 2025
22 checks passed
@donnapep donnapep deleted the update/replace-unlink-with-wp_delete_file branch January 14, 2025 13:32
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.

2 participants