From 6af90c193fd1f7851214571a08c82f194ecde220 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 18 Jul 2010 13:16:18 +0000 Subject: [PATCH] Removed error suppression operators (per bug 24159) --- thumb.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thumb.php b/thumb.php index 6e04f4aa3c..64f24c1877 100644 --- a/thumb.php +++ b/thumb.php @@ -101,8 +101,8 @@ function wfThumbMain() { // Calculate time wfSuppressWarnings(); $imsUnix = strtotime( $imsString ); + $stat = stat( $sourcePath ); wfRestoreWarnings(); - $stat = @stat( $sourcePath ); if ( $stat['mtime'] <= $imsUnix ) { header( 'HTTP/1.1 304 Not Modified' ); return; @@ -164,7 +164,7 @@ function wfThumbError( $status, $msg ) { header( 'HTTP/1.1 500 Internal server error' ); } if( $wgShowHostnames ) { - $url = htmlspecialchars( @$_SERVER['REQUEST_URI'] ); + $url = htmlspecialchars( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '' ); $hostname = htmlspecialchars( wfHostname() ); $debug = "\n\n"; } else { -- 2.20.1