View Issue Details

IDProjectCategoryView StatusLast Update
0000900XdebugUncategorizedpublic2015-04-06 21:35
ReporterGregMartyn Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
PlatformLinuxOSFedoraOS Version17
Product Version2.2.1 
Summary0000900: Logs filled with spurious warnings
Description

See attached test.php

I set a breakpoint on line 9
I get the warning: Warning: main(): Couldn't fetch mysqli_result in /var/www/Eclipse/theshadestore.com/public/htdocs/test.php on line 9

Stepping through the code functions correctly. The problem is all the warnings that I get.

Xdebug v2.3.0dev
PHP 5.4.7

Steps To Reproduce

see description

Additional Information

will attach remote_log

TagsNo tags attached.
Operating System
PHP Version5.4.4

Activities

derick

2012-11-11 12:54

administrator   ~0002378

Hi!

I've just investigated this, and found out that this is something I can't fix in Xdebug. mysqli_free_result() destroys the internal object, but leaves the resource (in your case, $rs) in a silly state. All Xdebug does internally is basically a var_dump( $rs ), and after it is freed with mysqli_free_result(), that throws exactly the same error (without Xdebug). This can however, easily be fixed in the MySQLi extension with the following patch:
http://derickrethans.nl/files/dump/mysqli-clear-result-cleanup-20121111.diff.txt

I've filed a bug for mysqli pointing at this bug report. It is at https://bugs.php.net/bug.php?id=63486