(Ilia)
- Added stream_resolve_include_path(). (Mikko)
+- Fixed bug #50636 (MySQLi_Result sets values before calling constructor).
+ (Pierrick)
- Fixed bug #48190 (Content-type parameter "boundary" is not case-insensitive
in HTTP uploads). (Ilia)
- Fixed bug #47409 (extract() problem with array containing word "this").
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);
} 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);
}
}
/* }}} */
--- /dev/null
+--TEST--
+Bug #50636 (MySQLi_Result sets values before calling constructor)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+ include ("connect.inc");
+
+ class Book {
+ private $title = 0;
+
+ function __construct() {
+ $this->title = 'foobar';
+ }
+
+ function __set($name, $value) {
+ $this->{$name} = $value;
+ }
+ }
+
+ $link = new mysqli($host, $user, $passwd);
+ var_dump($link->query('SELECT "PHP" AS title, "Rasmus" AS author')->fetch_object('Book'));
+ echo "done!";
+?>
+--EXPECTF--
+object(Book)#%d (2) {
+ ["title":"Book":private]=>
+ string(3) "PHP"
+ ["author"]=>
+ string(6) "Rasmus"
+}
+done!