--TEST-- mysqli_stmt_get_warnings() - TODO --SKIPIF-- errno, $link->error)); if (!@mysqli_query("INSERT INTO test(id) VALUES (100001)")) die("skip Strict sql mode seems to be active. We won't get a warning to check for."); mysqli_query($link, "DROP TABLE IF EXISTS test"); ?> --FILE-- message) printf("[013 - %d] Message should not be empty\n", $i); if ('' == $warning->sqlstate) printf("[014 - %d] SQL State should not be empty\n", $i); if (0 == $warning->errno) printf("[015 - %d] Error number should not be zero\n", $i); $i++; } while ($warning->next()); if (2 != $i) printf("[016] Expected 2 warnings, got %d warnings\n", $i); mysqli_stmt_close($stmt); if (NULL !== ($tmp = mysqli_stmt_get_warnings($stmt))) printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); mysqli_close($link); print "done!"; ?> --CLEAN-- --EXPECTF-- Warning: mysqli_stmt_get_warnings(): invalid object or resource mysqli_stmt in %s on line %d Warning: mysqli_stmt_get_warnings(): Couldn't fetch mysqli_stmt in %s on line %d done!