dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0324d0b
)
(bug 13454) Article::updateCategoryCounts can attempt to execute empty inserts.
author
Aryeh Gregor
<simetrical@users.mediawiki.org>
Thu, 20 Mar 2008 17:33:32 +0000
(17:33 +0000)
committer
Aryeh Gregor
<simetrical@users.mediawiki.org>
Thu, 20 Mar 2008 17:33:32 +0000
(17:33 +0000)
includes/Article.php
patch
|
blob
|
history
diff --git
a/includes/Article.php
b/includes/Article.php
index
10ff075
..
4404625
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-3367,6
+3367,10
@@
class Article {
#
# Sometimes I wish we had INSERT ... ON DUPLICATE KEY UPDATE.
$insertCats = array_merge( $added, $deleted );
+ if( !$insertCats ) {
+ # Okay, nothing to do
+ return;
+ }
$insertRows = array();
foreach( $insertCats as $cat ) {
$insertRows[] = array( 'cat_title' => $cat );