From 45be19b5260a85a734aab711995e23b85c4f13a8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 23 Dec 2004 04:54:48 +0000 Subject: [PATCH] * Avoid PHP warning messages when thumbnail not generated --- includes/Image.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/Image.php b/includes/Image.php index 6445453480..51cbf29fa2 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -506,10 +506,11 @@ class Image # Check for zero-sized thumbnails. Those can be generated when # no disk space is available or some other error occurs # - $thumbstat = stat( $thumbPath ); - if( $thumbstat['size'] == 0 ) - { - unlink( $thumbPath ); + if( file_exists( $thumbstat ) ) { + $thumbstat = stat( $thumbPath ); + if( $thumbstat['size'] == 0 ) { + unlink( $thumbPath ); + } } # Purge squid -- 2.20.1