Index: branches/wmf/1.18wmf1/extensions/LocalisationUpdate/LocalisationUpdate.class.php |
— | — | @@ -348,9 +348,14 @@ |
349 | 349 | // Get the array with messages. |
350 | 350 | $base_messages = self::parsePHP( $basefilecontents, 'base_messages' ); |
351 | 351 | if ( !is_array( $base_messages ) ) { |
352 | | - // Broken file? Report and bail |
353 | | - self::myLog( "Failed to parse $basefile" ); |
354 | | - return array(); |
| 352 | + if ( strpos( $basefilecontents, "\$base_messages" ) === false ) { |
| 353 | + // No $messages array. This happens for some languages that only have a fallback |
| 354 | + $base_messages = array(); |
| 355 | + } else { |
| 356 | + // Broken file? Report and bail |
| 357 | + self::myLog( "Failed to parse $basefile" ); |
| 358 | + return array(); |
| 359 | + } |
355 | 360 | } |
356 | 361 | |
357 | 362 | $comparefilecontents = self::getFileContents( $comparefile ); |
— | — | @@ -379,8 +384,14 @@ |
380 | 385 | $compare_messages = self::parsePHP( $comparefilecontents, 'compare_messages' ); |
381 | 386 | if ( !is_array( $compare_messages ) ) { |
382 | 387 | // Broken file? Report and bail |
383 | | - self::myLog( "Failed to parse $comparefile" ); |
384 | | - return array(); |
| 388 | + if ( strpos( $comparefilecontents, "\$compare_messages" ) === false ) { |
| 389 | + // No $messages array. This happens for some languages that only have a fallback |
| 390 | + self::myLog( "Skipping $langcode , no messages array in $comparefile", $verbose ); |
| 391 | + $compare_messages = array(); |
| 392 | + } else { |
| 393 | + self::myLog( "Failed to parse $comparefile" ); |
| 394 | + return array(); |
| 395 | + } |
385 | 396 | } |
386 | 397 | |
387 | 398 | // If the localfile and the remote file are the same, skip them! |
Property changes on: branches/wmf/1.18wmf1/extensions/LocalisationUpdate |
___________________________________________________________________ |
Modified: svn:mergeinfo |
388 | 399 | Merged /trunk/extensions/LocalisationUpdate:r106199 |