Exclude null rows from Special:MediaStatistics
[lhc/web/wiklou.git] / includes / specials / SpecialMediaStatistics.php
index 1056cda..b62de5d 100644 (file)
@@ -73,6 +73,10 @@ class MediaStatisticsPage extends QueryPage {
                                'namespace' => NS_MEDIA, /* needs to be something */
                                'value' => '1'
                        ),
+                       'conds' => array(
+                               // WMF has a random null row in the db
+                               'img_media_type IS NOT NULL'
+                       ),
                        'options' => array(
                                'GROUP BY' => array(
                                        'img_media_type',