Hello there, Sebastian from Jetpack here. I hope you are doing well.
It looks like you found an issue with the WP Super Cache plugin. Can you share more details of how you found this error? If possible, please attach a screenshot to your next reply. It could be helpful to understand the issue better. If you don’t know how to make a screenshot, here’s a quick explanation: https://en.support.wordpress.com/make-a-screenshot/
If you want to keep the conversation private, you can reach out to us from this form https://jetpack.com/contact-support/?hpi=1
Additionally, please post your site URL here so that we can have a look. If you want it to remain private, you can also contact us via the contact form. If you choose to reach out directly, please include a link to this thread.
Cheers.
Thread Starter
ArtZ91
(@artz91)
I use PHP method set_error_handler to catch any errors and set_exception_handler to catch exceptions. I see that @rmdir( $dir ); at 3269 cause E_WARNING with message No such file or directory, it’s strange, isn’t?
Need more detail code handling to know, what happening:
— Maybe it’s really no directory and need to skip rmdir to avoid warning.
— Maybe it’s some permission issue and need additional checks in code, idk.
That fact of using @ operator looks strange, you trying to suppress error output, but the error still visible for set_error_handler and still logged in that custom handler logic.
Thread Starter
ArtZ91
(@artz91)
Maybe need wrap this code like that:
if (is_dir($dir)) {
@rmdir($dir);
}
Or temporarily disable error handler:
$old_error_handler = set_error_handler(null);
try {
if (is_dir($dir)) {
rmdir($dir);
}
} finally {
// Restore error handler
set_error_handler($old_error_handler);
}
-
This reply was modified 6 months, 1 week ago by
ArtZ91.
Thread Starter
ArtZ91
(@artz91)
I think it’s file permission issue, but it’s hard to explain what wrong.
Hello @artz91,
Thanks for the extra detail and for sharing your suggestions.
If you’d like to get this in front of our developers and want to track it directly, you can log it in the Jetpack GitHub repository below (and tag it with Super Cache so it’s routed to the right folks): https://github.com/Automattic/jetpack/issues/new/choose.
That said, since WP Super Cache and Jetpack Boost are maintained by the same team, you might also like to try Boost’s free version. It’s built with performance best practices in mind and reflects the direction we’re taking with caching and optimization going forward.
For now, I’ll close this thread from our side, but please feel free to open a new topic if a new issue arises.
Cheers,