summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli.c
diff options
context:
space:
mode:
authorPierrick Charron <pierrick@php.net>2010-01-03 16:59:33 +0000
committerPierrick Charron <pierrick@php.net>2010-01-03 16:59:33 +0000
commit614fd65795468be21901581e2962510620fcf5b4 (patch)
tree259ff2d13bd17724bbd2359507ce332a13116be4 /ext/mysqli/mysqli.c
parent9ba1e81665df38fec244c926b3eff78034baa35a (diff)
downloadphp-git-614fd65795468be21901581e2962510620fcf5b4.tar.gz
Fixed bug #50636 (MySQLi_Result sets values before calling constructor)
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r--ext/mysqli/mysqli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 80e3759640..f5b7b96487 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -1205,7 +1205,6 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
zval *retval_ptr;
object_and_properties_init(return_value, ce, NULL);
- zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
if (ce->constructor) {
fci.size = sizeof(fci);
@@ -1261,6 +1260,8 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
} else if (ctor_params) {
zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "Class %s does not have a constructor hence you cannot use ctor_params", ce->name);
}
+
+ zend_merge_properties(return_value, Z_ARRVAL(dataset), 1 TSRMLS_CC);
}
}
/* }}} */