From 045d9a3b028ee9081da9928827ade12b4b48c2f0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 7 Aug 2004 03:41:50 +0000 Subject: [PATCH] marking error suppression operators so that they can easily be removed with a search and replace --- includes/Database.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index 1680761f49..528c252531 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -142,10 +142,10 @@ class Database { $success = false; - @$this->mConn = mysql_connect( $server, $user, $password ); + @/**/$this->mConn = mysql_connect( $server, $user, $password ); if ( $dbName != "" ) { if ( $this->mConn !== false ) { - $success = @mysql_select_db( $dbName, $this->mConn ); + $success = @/**/mysql_select_db( $dbName, $this->mConn ); if ( !$success ) { wfDebug( "Error selecting database \"$dbName\": " . $this->lastError() . "\n" ); } @@ -279,12 +279,12 @@ class Database { } function freeResult( $res ) { - if ( !@mysql_free_result( $res ) ) { + if ( !@/**/mysql_free_result( $res ) ) { wfDebugDieBacktrace( "Unable to free MySQL result\n" ); } } function fetchObject( $res ) { - @$row = mysql_fetch_object( $res ); + @/**/$row = mysql_fetch_object( $res ); # FIXME: HACK HACK HACK HACK debug if( mysql_errno() ) { wfDebugDieBacktrace( "Error in fetchObject(): " . htmlspecialchars( mysql_error() ) ); @@ -293,7 +293,7 @@ class Database { } function fetchRow( $res ) { - @$row = mysql_fetch_array( $res ); + @/**/$row = mysql_fetch_array( $res ); if (mysql_errno() ) { wfDebugDieBacktrace( "Error in fetchRow(): " . htmlspecialchars( mysql_error() ) ); } @@ -301,7 +301,7 @@ class Database { } function numRows( $res ) { - @$n = mysql_num_rows( $res ); + @/**/$n = mysql_num_rows( $res ); if( mysql_errno() ) { wfDebugDieBacktrace( "Error in numRows(): " . htmlspecialchars( mysql_error() ) ); } @@ -964,7 +964,7 @@ function wfEmergencyAbort( &$conn, $error ) { } else { if($title) { $t = Title::newFromURL( $title ); - } elseif (@$_REQUEST['search']) { + } elseif (@/**/$_REQUEST['search']) { $search = $_REQUEST['search']; echo wfMsgNoDB( "searchdisabled" ); echo wfMsgNoDB( "googlesearch", htmlspecialchars( $search ), $wgInputEncoding ); -- 2.20.1