Index: trunk/extensions/Gadgets/Gadgets_body.php |
— | — | @@ -204,6 +204,7 @@ |
205 | 205 | * @return Mixed: Instance of Gadget class or false if $definition is invalid |
206 | 206 | */ |
207 | 207 | public static function newFromDefinition( $definition ) { |
| 208 | + $m = array(); |
208 | 209 | if ( !preg_match( '/^\*+ *([a-zA-Z](?:[-_:.\w\d ]*[a-zA-Z0-9])?)(\s*\[.*?\])?\s*((\|[^|]*)+)\s*$/', $definition, $m ) ) { |
209 | 210 | return false; |
210 | 211 | } |
— | — | @@ -437,6 +438,7 @@ |
438 | 439 | $section = ''; |
439 | 440 | |
440 | 441 | foreach ( $g as $line ) { |
| 442 | + $m = array(); |
441 | 443 | if ( preg_match( '/^==+ *([^*:\s|]+?)\s*==+\s*$/', $line, $m ) ) { |
442 | 444 | $section = $m[1]; |
443 | 445 | } |
Index: trunk/extensions/AntiSpoof/AntiSpoof_body.php |
— | — | @@ -201,6 +201,7 @@ |
202 | 202 | * Convert string into array of Unicode code points as integers |
203 | 203 | */ |
204 | 204 | public static function stringToList( $str ) { |
| 205 | + $ar = array(); |
205 | 206 | if ( !preg_match_all( '/./us', $str, $ar ) ) { |
206 | 207 | return array(); |
207 | 208 | } |
Index: trunk/extensions/VariablePage/VariablePage.body.php |
— | — | @@ -15,11 +15,15 @@ |
16 | 16 | global $wgOut, $wgRequest; |
17 | 17 | global $wgVariablePagePossibilities; |
18 | 18 | |
19 | | - $lang = ( preg_match( '/^[A-Za-z-]+$/', $wgRequest->getVal( 'lang' ) ) ) ? $wgRequest->getVal( 'lang' ) : 'en' ; |
| 19 | + $lang = ( preg_match( '/^[A-Za-z-]+$/', $wgRequest->getVal( 'lang' ) ) ) |
| 20 | + ? $wgRequest->getVal( 'lang' ) |
| 21 | + : 'en' ; |
20 | 22 | $utm_source = $wgRequest->getVal( 'utm_source' ); |
21 | 23 | $utm_medium = $wgRequest->getVal( 'utm_medium' ); |
22 | 24 | $utm_campaign = $wgRequest->getVal( 'utm_campaign' ); |
23 | | - $referrer = ( $wgRequest->getVal( 'referrer' )) ? $wgRequest->getVal( 'referrer' ) : $wgRequest->getHeader( 'referer' ); |
| 25 | + $referrer = ( $wgRequest->getVal( 'referrer' )) |
| 26 | + ? $wgRequest->getVal( 'referrer' ) |
| 27 | + : $wgRequest->getHeader( 'referer' ); |
24 | 28 | |
25 | 29 | $query = array(); |
26 | 30 | if ( strlen( $lang ) ) $query[ 'language' ] = $lang; |
— | — | @@ -76,7 +80,7 @@ |
77 | 81 | global $wgVariablePagePossibilities, $wgVariablePageDefault; |
78 | 82 | |
79 | 83 | $total_probability = 0; |
80 | | - foreach ( $wgVariablePagePossibilities as $url => $probability ) { |
| 84 | + foreach ( $wgVariablePagePossibilities as $probability ) { |
81 | 85 | $total_probability += $probability; |
82 | 86 | } |
83 | 87 | |
Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php |
— | — | @@ -40,6 +40,7 @@ |
41 | 41 | |
42 | 42 | if ( !wfEmptyMsg( 'newusermessage-signatures', $signatures ) ) { |
43 | 43 | $pattern = '/^\* ?(.*?)$/m'; |
| 44 | + $signatureList = array(); |
44 | 45 | preg_match_all( $pattern, $signatures, $signatureList, PREG_SET_ORDER ); |
45 | 46 | if ( count( $signatureList ) > 0 ) { |
46 | 47 | $rand = rand( 0, count( $signatureList ) - 1 ); |
Index: trunk/extensions/ImageMap/ImageMap_body.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | $descType = self::BOTTOM_RIGHT; |
43 | 43 | $defaultLinkAttribs = false; |
44 | 44 | $realmap = true; |
| 45 | + $extLinks = array(); |
45 | 46 | foreach ( $lines as $line ) { |
46 | 47 | ++$lineNum; |
47 | 48 | $externLink = false; |
— | — | @@ -137,6 +138,7 @@ |
138 | 139 | |
139 | 140 | # Find the link |
140 | 141 | $link = trim( strstr( $line, '[' ) ); |
| 142 | + $m = array(); |
141 | 143 | if ( preg_match( '/^ \[\[ ([^|]*+) \| ([^\]]*+) \]\] \w* $ /x', $link, $m ) ) { |
142 | 144 | $title = Title::newFromText( $m[1] ); |
143 | 145 | $alt = trim( $m[2] ); |
Index: trunk/extensions/ExtensionDistributor/ExtensionDistributor_body.php |
— | — | @@ -314,6 +314,8 @@ |
315 | 315 | return false; |
316 | 316 | } |
317 | 317 | |
| 318 | + $encResponse = ''; |
| 319 | + |
318 | 320 | fwrite( $sock, $cmd . "\000\000\000" ); |
319 | 321 | while ( $sock && !feof( $sock ) ) { |
320 | 322 | $encResponse .= fread( $sock, 8192 ); |
Index: trunk/extensions/Vector/Vector.hooks.php |
— | — | @@ -104,8 +104,8 @@ |
105 | 105 | * |
106 | 106 | * Adds Vector-releated items to the preferences |
107 | 107 | * |
108 | | - * @param $out User current user |
109 | | - * @param $skin array list of default user preference controls |
| 108 | + * @param $user User current user |
| 109 | + * @param $defaultPreferences array list of default user preference controls |
110 | 110 | */ |
111 | 111 | public static function getPreferences( $user, &$defaultPreferences ) { |
112 | 112 | global $wgVectorFeatures; |