|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: shop1 at mokraemer dot de
New email:
PHP Version: OS:


 [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: Tue Jul 16 15:01:28 2024 UTC