Bug #67348 [Csd]: Reading $dbc->stat modifies $dbc->affected_rows

From: Date: Fri, 21 Jun 2019 20:50:13 +0000
Subject: Bug #67348 [Csd]: Reading $dbc->stat modifies $dbc->affected_rows
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221443@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67348&edit=1 ID: 67348 Updated by: nikic@php.net Reported by: derick@php.net Summary: Reading $dbc->stat modifies $dbc->affected_rows Status: Closed Type: Bug Package: MySQLi related Operating System: Linux PHP Version: 5.6Git-2014-05-27 (Git) Assigned To: derick Block user comment: N Private report: N New Comment: It's worth noting that the mysqli::$stat property was undocumented -- per documentation only mysqli::stat() exists, and of course that remains available. Previous Comments: ------------------------------------------------------------------------ [2019-06-21 20:46:25] derick@php.net There have been 5 years since the report of this bug, and nothing happening. This bug involves the MySQLi extension *destroying* data when reading this undocumented property (https://www.php.net/manual/en/class.mysqli.php) or doing a var_dump() on a MySQLi object. If you can fix this data trashing bug in another way, then feel free to attempt this. ------------------------------------------------------------------------ [2019-06-21 18:21:58] andrey@php.net Direct removal of a property, part of API, without deprecation. What's going on here?!? ------------------------------------------------------------------------ [2019-06-21 15:53:38] derick@php.net This is going to be in 7.4.0alpha2 and later, and the fix is to remove the stat property. The stat() method to obtain the same information is still available. ------------------------------------------------------------------------ [2019-06-21 15:52:45] derick@php.net Automatic comment on behalf of github@derickrethans.nl Revision: http://git.php.net/?p=php-src.git;a=commit;h=579562176b71820ad49d43b2c841642fef12fe57 Log: Fixed bug #67348: Reading $dbc->stat modifies $dbc->affected_rows ------------------------------------------------------------------------ [2018-11-21 10:44:53] kamilcodes at gmail dot com This is still an issue in PHP 7.2.2 I have spent days trying to figure out why the code I inherited works on the server but not on my local machine. "mysqli_affected_rows" was the culprit as this is what the previous devs used quite often. Is there anyone working on the fix? Is this issue being addressed at all? I would love to contribute but I do not have the skills, unfortunately. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=67348 -- Edit this bug report at https://bugs.php.net/bug.php?id=67348&edit=1

« previous php.bugs (#221443) next »