Delete the wp-content/uploads/lifterlms/.htaccess file
Clear the lifterlms_check_media_protection_files transient
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
Reproduction Steps
wp-content/uploads/lifterlms/.htaccess
filelifterlms_check_media_protection_files
transientExpected 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
This issue has be recreated: