[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysqli_fetch_assoc reports error from nested query #14255

Closed
kamil-tekiela opened this issue May 16, 2024 · 1 comment
Closed

mysqli_fetch_assoc reports error from nested query #14255

kamil-tekiela opened this issue May 16, 2024 · 1 comment

Comments

@kamil-tekiela
Copy link
Member

Description

The following code:

<?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

@nielsdos
Copy link
Member

This was fixed by #14256, but because the commit title didn't include the bug number GH didn't close it automatically. Manually closing it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants