|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81034 mysqli_result::free emmits exception/warning
Submitted: 2021-05-12 09:40 UTC Modified: 2021-05-23 04:22 UTC
From: shop1 at mokraemer dot de Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 8.0.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
41 - 27 = ?
Subscribe to this entry?

 [2021-05-12 09:40 UTC] shop1 at mokraemer dot de
an exception is thrown and a warning is emitted if no result is available.
There is no need to emmit this!!!

With this (change due to @ operator) it makes db handling more complex without any benefit. Since insert/update events do not have any results.

Expected result:
do NOT emit any warning! this causes error checks to trigger, which is not desireable!!!

Actual result:
an exception is emitted (can be handled, but unneeded)
and a warning is emitted which is worse, since it can't be silenced!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-05-12 09:41 UTC]
-Status: Open +Status: Feedback
 [2021-05-12 09:41 UTC]
Could you please provide an example script for the case you have in mind?
 [2021-05-23 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2021-05-23 07:11 UTC] rtrtrtrtrt at dfdfdfdf dot dfd
> Since insert/update events do not have any results

and why would you then free the result?
be happy that php tells you a useless function call

in 99.9% of all cases you can remove 100% of mysqli_result::free from your codebase at all
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 12 18:01:29 2024 UTC