1--TEST-- 2mysqli_result(), invalid mode 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifemb.inc'); 7require_once('skipifconnectfailure.inc'); 8?> 9--FILE-- 10<?php 11 require('connect.inc'); 12 require('table.inc'); 13 14 $valid = array(MYSQLI_STORE_RESULT, MYSQLI_USE_RESULT); 15 do { 16 $mode = mt_rand(-1000, 1000); 17 } while (in_array($mode, $valid)); 18 19 if (!is_object($res = new mysqli_result($link, $mode))) 20 printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); 21 22 print "done!"; 23?> 24--CLEAN-- 25<?php 26 require_once("clean_table.inc"); 27?> 28--EXPECTF-- 29Warning: mysqli_result::__construct(): Invalid value for resultmode in %s on line %d 30done! 31