|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2021-03-05 22:01 UTC] dharman@php.net
[2021-03-15 13:39 UTC] nikic@php.net
[2021-03-15 13:39 UTC] nikic@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Description: ------------ Calling stmt_store_result when in the middle of manual fetch cycle should throw an OOS error. However, mysqlnd sets the error in conn property which means mysqli will not throw it. Test script: --------------- <?php mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); $mysqli = new mysqli('localhost', 'user', 'password', 'test'); $mysqli->set_charset('utf8mb4'); // always set the charset $statement = $mysqli->prepare("SELECT b FROM a"); $statement->execute(); $statement->bind_result($name); $statement->fetch(); $statement->store_result(); var_dump($mysqli->error, $statement->error); echo $statement->num_rows(); Expected result: ---------------- Fatal error: Uncaught mysqli_sql_exception: Commands out of sync; you can't run this command now Actual result: -------------- string(52) "Commands out of sync; you can't run this command now" string(0) "" 0