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

Warning when htaccess file doesn't exist #2735

Open
4 tasks
brianhogg opened this issue Aug 19, 2024 · 0 comments
Open
4 tasks

Warning when htaccess file doesn't exist #2735

brianhogg opened this issue Aug 19, 2024 · 0 comments
Assignees

Comments

@brianhogg
Copy link
Contributor

Reproduction Steps

  1. Delete the wp-content/uploads/lifterlms/.htaccess file
  2. Clear the lifterlms_check_media_protection_files transient
  3. Login as admin

Expected Behavior

No warning, file is created.

Actual Behavior

PHP warning that we're trying to get contents of wp-content/uploads/lifterlms/.htaccess which doesn't exist.

Error Messages / Logs

file_get_contents(.../wp-content/uploads/lifterlms/.htaccess): Failed to open stream: No such file or directory

    wp-admin/includes/class-wp-filesystem-direct.php:39
    file_get_contents()
    wp-admin/includes/class-wp-filesystem-direct.php:39
    WP_Filesystem_Direct->get_contents()
    wp-content/plugins/lifterlms/includes/class-llms-media-protector.php:652
    LLMS_Media_Protector->save_mod_rewrite_rules()
    wp-includes/class-wp-hook.php:324
    do_action('admin_init')
    wp-admin/admin.php:175

This issue has be recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme
@ideadude ideadude moved this to Awaiting Triage in Development Aug 19, 2024
@ideadude ideadude self-assigned this Aug 19, 2024
@brianhogg brianhogg moved this from Awaiting Triage to Awaiting Review in Development Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Awaiting Review
Development

No branches or pull requests

2 participants