|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 03:00:01 2025 UTC |
Description: ------------ Reading mysqli_stmt::num_rows property or calling the method mysqli_stmt::num_rows() should throw an error if using unbuffered results and the result hasn't been fully fetched yet. 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 $stmt = $mysqli->prepare('SELECT * FROM a LIMIT 2'); $stmt->execute(); echo $stmt->num_rows; // <-- Should trigger OOS error Expected result: ---------------- Out of sync error Actual result: -------------- 0