From: Aaron Date: Thu, 5 Jul 2012 20:54:33 +0000 (-0700) Subject: Tweaked mysql_affected_rows() check in WikiPage since it can return -1. X-Git-Tag: 1.31.0-rc.0~23118^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=03cca408ca8d8d13bf58125a41f821fc7ff49a72;p=lhc%2Fweb%2Fwiklou.git Tweaked mysql_affected_rows() check in WikiPage since it can return -1. In theory, a DBError or something should be thrown already; this is just for sanity. Change-Id: Ie54dc764ee4d4c6e450b7bcff5663c1707027c6d --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 670b36ea98..43932a7ede 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1181,7 +1181,7 @@ class WikiPage extends Page { $conditions, __METHOD__ ); - $result = $dbw->affectedRows() != 0; + $result = $dbw->affectedRows() > 0; if ( $result ) { $this->updateRedirectOn( $dbw, $rt, $lastRevIsRedirect ); $this->setLastEdit( $revision );