Index: trunk/phase3/includes/Article.php |
— | — | @@ -3375,7 +3375,8 @@ |
3376 | 3376 | foreach( $insertCats as $cat ) { |
3377 | 3377 | $insertRows[] = array( 'cat_title' => $cat ); |
3378 | 3378 | } |
3379 | | - $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' ); |
| 3379 | + if ( count( $insertRows ) ) |
| 3380 | + $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' ); |
3380 | 3381 | |
3381 | 3382 | $addFields = array( 'cat_pages = cat_pages + 1' ); |
3382 | 3383 | $removeFields = array( 'cat_pages = cat_pages - 1' ); |