$this->showForm( wfMsg( 'locknoconfirm' ) );
return;
}
- $fp = @fopen( $wgReadOnlyFile, 'w' );
+
+ wfSuppressWarnings();
+ $fp = fopen( $wgReadOnlyFile, 'w' );
+ wfRestoreWarnings();
if ( false === $fp ) {
# This used to show a file not found error, but the likeliest reason for fopen()
$this->showForm( wfMsg( 'locknoconfirm' ) );
return;
}
- if ( @!unlink( $wgReadOnlyFile ) ) {
+
+ wfSuppressWarnings();
+ $res = unlink( $wgReadOnlyFile );
+ wfRestoreWarnings();
+
+ if ( !$res ) {
$wgOut->showFileDeleteError( $wgReadOnlyFile );
return;
}