[php-src] Issue #14255: mysqli_fetch_assoc reports error from nested query

From: Date: Thu, 16 May 2024 19:33:30 +0000
Subject: [php-src] Issue #14255: mysqli_fetch_assoc reports error from nested query
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246922@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/14255 Author: kamil-tekiela ### Description The following code: ```php <?php $ca = $mysqli->query('SELECT 1 '); $c = $ca->fetch_assoc(); try { $mysqli->query('SELECT non_existent_column'); } catch (Exception $e) { echo "Caught exception"."\n"; } $c = $ca->fetch_assoc(); ``` Resulted in this output: ``` Caught exception Fatal error: Uncaught mysqli_sql_exception: Unknown column 'non_existent_column' in 'field list' ... ``` But I expected this output instead: ``` Caught exception ``` ### PHP Version PHP 8.2 ### Operating System _No response_

« previous php.bugs (#246922) next »