• Uncaught TypeError: is_file(): Argument #1 ($filename) must be of type string, GdImage given in /home/*/public_html/wp-content/plugins/auto-smart-thumbnails/inc/class-ast-face-detector.php:63

    Occurred during loading of Customizer.

    • This topic was modified 3 years, 8 months ago by Knut Sparhell. Reason: Extra info
Viewing 2 replies - 1 through 2 (of 2 total)
  • Can you turn on debug log? Here is how:
    Check ‘Log debug info for troubleshooting’ in ‘Settings -> Auto Smart Thumbnails’. Leave a note here what site url is having the problem.

    I had the same bug, I was able to investigate and found a solution

    The is_ressource function doesn’t return true anymore when you send it a gimage object in php8 (reference here)
    So the code fails a line 63 in class-ast-face-detector.php.

    I was able to make it work by testing the value of get_class for the ressource :

            if (is_resource($file) || get_class($file) == 'GdImage') {
    
                $this->canvas = $file;
    
            } elseif (is_file($file)) {
    
                $this->canvas = imagecreatefromjpeg($file);
    

    I am not sure if it is the best fix but it seems to work

    • This reply was modified 3 years, 4 months ago by jilfransoi.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error in PHP’ is closed to new replies.