Bug #81034 [Com]: mysqli_result::free emmits exception/warning
| From: | rtrtrtrtrt at dfdfdfdf dot dfd | Date: | Sun, 23 May 2021 07:11:21 +0000 |
| Subject: | Bug #81034 [Com]: mysqli_result::free emmits exception/warning | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233992@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81034&edit=1
ID: 81034
Comment by: rtrtrtrtrt at dfdfdfdf dot dfd
Reported by: shop1 at mokraemer dot de
Summary: mysqli_result::free emmits exception/warning
Status: No Feedback
Type: Bug
Package: MySQLi related
PHP Version: 8.0.6
Block user comment: N
Private report: N
New Comment:
> 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
Previous Comments:
------------------------------------------------------------------------
[2021-05-23 04:22:09] 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-12 09:41:41] nikic@php.net
Could you please provide an example script for the case you have in mind?
------------------------------------------------------------------------
[2021-05-12 09:40:24] shop1 at mokraemer dot de
Description:
------------
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!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81034&edit=1