. Fixed bug #66584 (Segmentation fault on statement deallocation) (Matteo)
. Fixed bug #67462 (PDO_PGSQL::beginTransaction() wrongly throws exception
when not in transaction) (Matteo)
+ . Fixed bug #68351 (PDO::PARAM_BOOL and ATTR_EMULATE_PREPARES misbehaving)
+ (Matteo)
- SPL:
. Fixed bug #68128 (Regression in RecursiveRegexIterator) (Tjerk)
((param->param_type & PDO_PARAM_INPUT_OUTPUT) != PDO_PARAM_INPUT_OUTPUT)) {
SEPARATE_ZVAL(¶m->parameter);
param->param_type = PDO_PARAM_STR;
+ convert_to_boolean(param->parameter);
ZVAL_STRINGL(param->parameter, Z_BVAL_P(param->parameter) ? "t" : "f", 1, 1);
}
}
$errors[] = $query->errorInfo();
var_dump($value);
+// Try with strings - Bug #68351
+$value = '0';
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
+$value = "abc";
+$query->bindParam(':foo', $value, PDO::PARAM_BOOL);
+$query->execute();
+$errors[] = $query->errorInfo();
+var_dump($query->fetchColumn());
+
$expect = 'No errors found';
foreach ($errors as $error)
--EXPECTF--
bool(true)
bool(false)
+bool(true)
+bool(false)
No errors found