Index: trunk/phase3/includes/User.php |
— | — | @@ -1477,7 +1477,9 @@ |
1478 | 1478 | if( $count > $max ) { |
1479 | 1479 | wfDebug( __METHOD__ . ": tripped! $key at $count $summary\n" ); |
1480 | 1480 | if( $wgRateLimitLog ) { |
1481 | | - @file_put_contents( $wgRateLimitLog, wfTimestamp( TS_MW ) . ' ' . wfWikiID() . ': ' . $this->getName() . " tripped $key at $count $summary\n", FILE_APPEND ); |
| 1481 | + wfSuppressWarnings(); |
| 1482 | + file_put_contents( $wgRateLimitLog, wfTimestamp( TS_MW ) . ' ' . wfWikiID() . ': ' . $this->getName() . " tripped $key at $count $summary\n", FILE_APPEND ); |
| 1483 | + wfRestoreWarnings(); |
1482 | 1484 | } |
1483 | 1485 | $triggered = true; |
1484 | 1486 | } else { |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -754,8 +754,8 @@ |
755 | 755 | # Use external methods for external objects, text in table is URL-only then |
756 | 756 | if ( in_array( 'external', $flags ) ) { |
757 | 757 | $url = $text; |
758 | | - @list(/* $proto */, $path ) = explode( '://', $url, 2 ); |
759 | | - if( $path == '' ) { |
| 758 | + $parts = explode( '://', $url, 2 ); |
| 759 | + if( count( $parts ) == 1 || $parts[1] == '' ) { |
760 | 760 | wfProfileOut( __METHOD__ ); |
761 | 761 | return false; |
762 | 762 | } |
Index: trunk/phase3/includes/StreamFile.php |
— | — | @@ -10,7 +10,9 @@ |
11 | 11 | * @param $headers array |
12 | 12 | */ |
13 | 13 | function wfStreamFile( $fname, $headers = array() ) { |
14 | | - $stat = @stat( $fname ); |
| 14 | + wfSuppressWarnings(); |
| 15 | + $stat = stat( $fname ); |
| 16 | + wfRestoreWarnings(); |
15 | 17 | if ( !$stat ) { |
16 | 18 | header( 'HTTP/1.0 404 Not Found' ); |
17 | 19 | header( 'Cache-Control: no-cache' ); |
Index: trunk/phase3/includes/specials/SpecialWantedpages.php |
— | — | @@ -35,10 +35,10 @@ |
36 | 36 | $inc = $this->including(); |
37 | 37 | |
38 | 38 | if ( $inc ) { |
39 | | - @list( $limit, $nlinks ) = explode( '/', $par, 2 ); |
40 | | - $this->limit = (int)$limit; |
| 39 | + $parts = explode( '/', $par, 2 ); |
| 40 | + $this->limit = (int)$parts[0]; |
41 | 41 | // @todo FIXME: nlinks is ignored |
42 | | - $nlinks = $nlinks === 'nlinks'; |
| 42 | + $nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks'; |
43 | 43 | $this->offset = 0; |
44 | 44 | } else { |
45 | 45 | $nlinks = true; |