ports/146030: [PATCH] Fix mail/roundcube when PHP 5.3 is used
Denny Lin
dennylin93 at hs.ntnu.edu.tw
Sun Apr 25 02:50:02 UTC 2010
>Number: 146030
>Category: ports
>Synopsis: [PATCH] Fix mail/roundcube when PHP 5.3 is used
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 25 02:50:02 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Denny Lin
>Release: FreeBSD 8.0-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD mail.hs.ntnu.edu.tw 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Sat Feb 13 21:10:50 CST 2010 root at mail.hs.ntnu.edu.tw:/usr/obj/usr/src/sys/MAIL amd64
>Description:
After upgrading to PHP 5.3, MDB2 becomes broken, which renders RC unusable. Previously, in PHP 5.2 bind_param() allowed parameters to be passed by value. However, only pass by reference is allowed in PHP 5.3.
Also check $result for not TRUE instead of FALSE since call_user_func_array() returns NULL when an error is encountered while parsing parameters.
The attached patch provides a fix for 0.3.1.
>How-To-Repeat:
>Fix:
--- patch-program_lib_MDB2_Driver_mysqli.php begins here ---
--- program/lib/MDB2/Driver/mysqli.php.orig 2010-04-25 07:45:44.000000000 +0800
+++ program/lib/MDB2/Driver/mysqli.php 2010-04-25 07:47:11.000000000 +0800
@@ -1720,7 +1720,9 @@
if (PEAR::isError($quoted)) {
return $quoted;
}
- $parameters[] = $quoted;
+ $bind_param = 'bind_param' . $i;
+ $$bind_param = $quoted;
+ $parameters[] = &$$bind_param;
$parameters[1].= $this->db->datatype->mapPrepareDatatype($type);
}
++$i;
@@ -1731,7 +1733,7 @@
$query.= ' USING @'.implode(', @', array_values($this->positions));
} else {
$result = @call_user_func_array('mysqli_stmt_bind_param', $parameters);
- if ($result === false) {
+ if ($result !== true) {
$err =& $this->db->raiseError(null, null, null,
'Unable to bind parameters', __FUNCTION__);
return $err;
--- patch-program_lib_MDB2_Driver_mysqli.php ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list