-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fatal error when delete webP image #815
Comments
The fatal error is caused by this line, we are now allowing cc @Miraeld imagify-plugin/classes/Optimization/File.php Lines 786 to 788 in 0103815
|
Umm, imagify-plugin/classes/Optimization/File.php Lines 756 to 766 in 431a4ff
The thing is, who managed the deleting part in the previous feedback ? It might be easier for them to take a look at it, @wordpressfan @jeawhanlee or @Tabrisrp. I've also noticed something that doesn't make sense in the code: imagify-plugin/classes/Optimization/Process/AbstractProcess.php Lines 1461 to 1464 in 4502844
In here, we say that |
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
When delete webP image, we will have fatal error
[26-Feb-2024 08:19:43 UTC] PHP Fatal error: Uncaught TypeError: Imagify\Optimization\Process\AbstractProcess::delete_file(): Argument #1 ($next_gen_path) must be of type string, bool given, called in /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/classes/Optimization/Process/AbstractProcess.php on line 1451 and defined in /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/classes/Optimization/Process/AbstractProcess.php:1461 Stack trace: #0 /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/classes/Optimization/Process/AbstractProcess.php(1451): Imagify\Optimization\Process\AbstractProcess->delete_file(false) #1 /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/classes/Optimization/Process/AbstractProcess.php(1411): Imagify\Optimization\Process\AbstractProcess->delete_nextgen_file('/home/mai/Local...') #2 /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/inc/common/attachments.php(41): Imagify\Optimization\Process\AbstractProcess->delete_nextgen_files() #3 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/class-wp-hook.php(324): imagify_cleanup_after_media_deletion(Object(Imagify\Optimization\Process\WP)) #4 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #5 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/inc/functions/media.php(21): do_action('imagify_delete_...', Object(Imagify\Optimization\Process\WP)) #7 /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/inc/common/attachments.php(20): imagify_trigger_delete_media_hook(Object(Imagify\Optimization\Process\WP)) #8 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/class-wp-hook.php(326): imagify_trigger_delete_attachment_hook(47) #9 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /home/mai/Local Sites/imagifynginx/app/public/wp-includes/post.php(6302): do_action('delete_attachme...', 47, Object(WP_Post)) #12 /home/mai/Local Sites/imagifynginx/app/public/wp-admin/post.php(321): wp_delete_attachment(47, true) #13 {main} thrown in /home/mai/Local Sites/imagifynginx/app/public/wp-content/plugins/imagify-plugin/classes/Optimization/Process/AbstractProcess.php on line 1461
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No error when delete webp image while imagify is active
Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming
The text was updated successfully, but these errors were encountered: