Index: trunk/phase3/includes/specials/SpecialLockdb.php |
— | — | @@ -109,8 +109,11 @@ |
110 | 110 | $this->showForm( wfMsg( 'locknoconfirm' ) ); |
111 | 111 | return; |
112 | 112 | } |
113 | | - $fp = @fopen( $wgReadOnlyFile, 'w' ); |
114 | 113 | |
| 114 | + wfSuppressWarnings(); |
| 115 | + $fp = fopen( $wgReadOnlyFile, 'w' ); |
| 116 | + wfRestoreWarnings(); |
| 117 | + |
115 | 118 | if ( false === $fp ) { |
116 | 119 | # This used to show a file not found error, but the likeliest reason for fopen() |
117 | 120 | # to fail at this point is insufficient permission to write to the file...good old |
Index: trunk/phase3/includes/specials/SpecialUnlockdb.php |
— | — | @@ -104,7 +104,12 @@ |
105 | 105 | $this->showForm( wfMsg( 'locknoconfirm' ) ); |
106 | 106 | return; |
107 | 107 | } |
108 | | - if ( @!unlink( $wgReadOnlyFile ) ) { |
| 108 | + |
| 109 | + wfSuppressWarnings(); |
| 110 | + $res = unlink( $wgReadOnlyFile ); |
| 111 | + wfRestoreWarnings(); |
| 112 | + |
| 113 | + if ( !$res ) { |
109 | 114 | $wgOut->showFileDeleteError( $wgReadOnlyFile ); |
110 | 115 | return; |
111 | 116 | } |