summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-02-19 12:09:47 +0000
committerFelipe Pena <felipe@php.net>2008-02-19 12:09:47 +0000
commitd0fea1442867538e201853681844c6a92e64cbd1 (patch)
tree69990195cf90ff1ffc47a043323ba95822198fda
parentee82eac68a698acc9f15990554d865e3e4efe1c2 (diff)
downloadphp-git-d0fea1442867538e201853681844c6a92e64cbd1.tar.gz
Fixed Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
-rw-r--r--NEWS2
-rwxr-xr-xext/pdo/pdo_dbh.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index d2c2eb9996..16a8631a36 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP NEWS
which to group by data is specified. (Ilia)
- Upgraded PCRE to version 7.6 (Nuno)
+- Fixed Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL)).
+ (Felipe)
- Fixed bug #44069 (Huge memory usage with concatenation using . instead of
.=). (Dmitry)
- Fixed bug #44046 (crash inside array_slice() function with an invalid
diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c
index 20ffaa1249..c017fa754e 100755
--- a/ext/pdo/pdo_dbh.c
+++ b/ext/pdo/pdo_dbh.c
@@ -815,9 +815,9 @@ static PHP_METHOD(PDO, setAttribute)
{
pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC);
long attr;
- zval *value = NULL;
+ zval *value;
- if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz!", &attr, &value)) {
+ if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz", &attr, &value)) {
RETURN_FALSE;
}