• line 117 of functions.yith-wc-featured-audio-video.php contains an error control operator for “@unlink”, however with PHP 8+ now, certain error types are no longer suppressed, thus the application is completely stopped.

    // If error storing temporarily, unlink.
    if ( is_wp_error( $tmp ) ) {
        @unlink( $file_array['tmp_name'] );
        $file_array['tmp_name'] = '';
    }

    The error I’m getting within my application after updating from PHP7.4 to PHP8.1 is:

    <b>Fatal error</b>: Uncaught TypeError: unlink(): Argument #1 ($filename) must be of type string, WP_Error given in /path/to/…/plugins/yith-woocommerce-featured-video/includes/functions.yith-wc-featured-audio-video.php:117

    Is this on your radar to address now that PHP7.4 is deprecated and sites should be looking to run on PHP8+?

    Please let me know if you need any further info on this item.

    Thank you.

    • This topic was modified 1 year, 12 months ago by ldaughenbaugh.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP8.1 Fatal Error with @unlink’ is closed to new replies.