r32233 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32232‎ | r32233 | r32234 >
Date:17:33, 20 March 2008
Author:simetrical
Status:old
Tags:
Comment:
(bug 13454) Article::updateCategoryCounts can attempt to execute empty inserts.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -3367,6 +3367,10 @@
33683368 #
33693369 # Sometimes I wish we had INSERT ... ON DUPLICATE KEY UPDATE.
33703370 $insertCats = array_merge( $added, $deleted );
 3371+ if( !$insertCats ) {
 3372+ # Okay, nothing to do
 3373+ return;
 3374+ }
33713375 $insertRows = array();
33723376 foreach( $insertCats as $cat ) {
33733377 $insertRows[] = array( 'cat_title' => $cat );

Status & tagging log