com web/bugs: use MDB2_PREPARE_MANIP so that the execute call returns the number of affected calls . this fixes the http 500 for unsubscibin g from a
bug: include/functions.php
| From: | Ferenc Kovacs | Date: | Thu, 30 Aug 2012 22:49:44 +0000 |
| Subject: | com web/bugs: use MDB2_PREPARE_MANIP so that the execute call returns the number of affected calls . this fixes the http 500 for unsubscibin g from a bug: include/functions.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-14581@lists.php.net to get a copy of this message | ||
Commit: 8e52b180c27219dea17561db974507f3968e7121
Author: Ferenc Kovacs <tyra3l@gmail.com> Fri, 31 Aug 2012 00:49:44 +0200
Parents: 76e5171ced1f2def43626d37ac2d2e9ab3821880
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=8e52b180c27219dea17561db974507f3968e7121
Log:
use MDB2_PREPARE_MANIP so that the execute call returns the number of affected calls. this fixes the
http 500 for unsubscibing from a bug
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index de82d79..48a2e34 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -1485,9 +1485,7 @@ function unsubscribe_hash($bug_id, $email)
WHERE bug_id = ? AND email = ?
";
- $res = $dbh->prepare($query)->execute(array($hash,$bug_id, $email));
-
- $affected = $dbh->affectedRows($res);
+ $affected = $dbh->prepare($query, null, MDB2_PREPARE_MANIP)->execute(array($hash,$bug_id,
$email));
if ($affected > 0) {
$hash = urlencode($hash);