From 678482beaaf357a20f8545276927614fca5e92b5 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 9 Jun 2011 19:52:07 +0000 Subject: [PATCH] Removed some usage of error suppression operator --- includes/ConfEditor.php | 2 +- includes/HistoryBlob.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/ConfEditor.php b/includes/ConfEditor.php index 3604ee83bb..42a7173d5e 100644 --- a/includes/ConfEditor.php +++ b/includes/ConfEditor.php @@ -315,7 +315,7 @@ class ConfEditor { // extra quote on the end! return strtr( substr( trim( $str ), 1, -1 ), array( '\\\'' => '\'', '\\\\' => '\\' ) ); - if ( $str !== '' && @$str[0] == '"' ) + if ( $str !== '' && $str[0] == '"' ) // Double-quoted string // @todo FIXME: trim() call is due to mystery bug where whitespace gets // appended to the token; without it we ended up reading in the diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index fdc55a5d5c..f707b3f6a5 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -225,8 +225,8 @@ class HistoryBlobStub { $flags = explode( ',', $row->old_flags ); if( in_array( 'external', $flags ) ) { $url=$row->old_text; - @list( /* $proto */ ,$path)=explode('://',$url,2); - if ( $path == "" ) { + $parts = explode( '://', $url, 2 ); + if ( !isset( $parts[1] ) || $parts[1] == '' ) { wfProfileOut( $fname ); return false; } -- 2.20.1