Bug #72151 [Opn]: mysqli_fetch_object changed behaviour from 5.6.20
Edit report at https://bugs.php.net/bug.php?id=72151&edit=1
ID: 72151
Updated by: ondrej@php.net
Reported by: nicola at tiphys dot com
Summary: mysqli_fetch_object changed behaviour from 5.6.20
Status: Open
Type: Bug
Package: MySQLi related
PHP Version: 5.6.21
-Assigned To:
+Assigned To: ab
Block user comment: N
Private report: N
New Comment:
This affects both 5.6.21 and 7.0.6 as well.
Previous Comments:
------------------------------------------------------------------------
[2016-05-08 08:00:47] neo22s at gmail dot com
In PHP.net documentation http://php.net/manual/en/mysqli-result.fetch-object.php
Says "Note that mysqli_fetch_object() sets the properties of the object before calling the
object constructor."
So yes this is a bug :(
------------------------------------------------------------------------
[2016-05-05 07:43:14] neo22s at gmail dot com
Same issue on PHP 7.0.6.
------------------------------------------------------------------------
[2016-05-04 10:30:39] nicola at tiphys dot com
changed title
------------------------------------------------------------------------
[2016-05-04 10:26:52] nicola at tiphys dot com
Description:
------------
mysqli_fetch_object calls __set after calling the object constructor now.
In 5.6.20 and below the behaviour was the opposite, same with PDO and the old mysql extension.
I think the commit that makes this change is this one:
https://github.com/php/php-src/commit/1b632cfe834bfd87d182566d7d960df7d10ded72
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72151&edit=1
Thread (9 messages)