View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001071||Xdebug||Usage problems (Wrong Results)||public||2014-08-20 21:08||2014-11-11 20:07|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Platform||64bit||OS||Windows||OS Version||Windows 7|
|Target Version||Fixed in Version|
|Summary||0001071: Many warnings if breakpoint is setted after a closed prepared mysqli statement|
|Description||If I set a breakpoint after a closed mysqli statement, I get a lot of warnings like|
Property access is not allowed yet (3 times)
Couldn't fetch mysqli_stmt (7 times)
pointing to the line i setted the breakpoint to.
But the statement is already closed and not used in this line or any line after.
If I do not set any breakpoint the script runs perfectly fine without errors or wanings and it also loads the data from the database correctly.
|Steps To Reproduce||$conn = new mysqli($host, $username, $passwd, $dbname);|
$stmt = $conn->prepare('SELECT ...');
// do something here
$stmt->close(); // setting a breakpoint AFTER this.
... // maybe here
// do something more here that has absolutly nothing to do with $stmt
|Additional Information||I used additional xdebug settings:|
xdebug.collect_vars = "on"
xdebug.collect_params = 2
xdebug.show_local_vars = "on"
xdebug.trace_format = 1
A workaround is to unset $stmt after closing.
|Tags||No tags attached.|
This is happening to me too, it's not new though. You will also find that when using xdebug, the value of affected_rows might mysteriously be set to -1 even though a command statement succeeded. It makes debugging very herd because you have to 2nd guess if your code is only failing in the debugger.
Thanks for reporting this because I had forgotten about it and was really confused why so many 'errors' kept happening in code that used to work perfectly!
This is a bug in the MySQLi driver. I have filed a bug already for this way
in the past: https://bugs.php.net/bug.php?id=67348
|2014-08-20 21:08||AbcAeffchen||New Issue|
|2014-11-09 10:40||robertjohnson||Note Added: 0002889|
|2014-11-11 20:07||derick||Note Added: 0002906|
|2014-11-11 20:07||derick||Status||new => resolved|
|2014-11-11 20:07||derick||Resolution||open => not fixable|
|2014-11-11 20:07||derick||Assigned To||=> derick|
|2016-07-31 12:36||derick||Category||Usage problems => Usage problems (Crashes)|
|2016-07-31 12:38||derick||Category||Usage problems (Crashes) => Usage problems (Wrong Results)|