[php-src] Issue #9841: mysqli_query throws warning despite using silenced error mode
| From: | kamil-tekiela | Date: | Thu, 27 Oct 2022 13:48:53 +0000 |
| Subject: | [php-src] Issue #9841: mysqli_query throws warning despite using silenced error mode | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-242692@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/9841
Author: kamil-tekiela
### Description
The following code:
```php
<?php
mysqli_report(MYSQLI_REPORT_OFF);
$mysqli = new mysqli('localhost', 'user', 'password',
'test');
$mysqli->query("SELECT (
SELECT 1 AS val
UNION ALL
SELECT 2
) FROM dual");
```
Resulted in this output:
```
Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in ...
```
But I expected this output instead:
```
```
### PHP Version
PHP 8.0.20
### Operating System
Windows and Ubuntu