r97313 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97312‎ | r97313 | r97314 >
Date:18:49, 16 September 2011
Author:nikerabbit
Status:ok
Tags:
Comment:
Don't add nulls to the database...
Modified paths:
  • /trunk/extensions/Translate/utils/MessageGroupStats.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageGroupStats.php
@@ -241,6 +241,11 @@
242242
243243 list( $total, $translated, $fuzzy ) = $aggregates;
244244
 245+ // Don't add nulls to the database, causes annoying warnings
 246+ if ( $total === null ) {
 247+ return $aggregates;
 248+ }
 249+
245250 $data = array(
246251 'tgs_group' => $id,
247252 'tgs_lang' => $code,

Status & tagging log