#define CHECK_STATUS(value) \
if (!obj->ptr || ((MYSQLI_RESOURCE *)obj->ptr)->status < value ) { \
php_error_docref(NULL, E_WARNING, "Property access is not allowed yet"); \
- ZVAL_NULL(retval); \
+ ZVAL_FALSE(retval); \
return retval; \
} \
MYSQL *p; \
if (!obj->ptr || !(MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr) { \
php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(obj->zo.ce->name));\
- ZVAL_NULL(retval);\
+ ZVAL_FALSE(retval);\
return retval; \
} else { \
CHECK_STATUS(statusval);\
mysqli_object *intern = Z_MYSQLI_P(__id); \
if (!(my_res = (MYSQLI_RESOURCE *)intern->ptr)) {\
php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", ZSTR_VAL(intern->zo.ce->name));\
- RETURN_NULL();\
+ RETURN_FALSE;\
}\
__ptr = (__type)my_res->ptr; \
if (__check && my_res->status < __check) { \
php_error_docref(NULL, E_WARNING, "invalid object or resource %s\n", ZSTR_VAL(intern->zo.ce->name)); \
- RETURN_NULL();\
+ RETURN_FALSE;\
}\
}
[1]=>
%s(3) "bar"
}
-NULL
-bool(true)
\ No newline at end of file
+bool(false)
+bool(true)
}
object(mysqli)#%d (%d) {
["affected_rows"]=>
- NULL
+ bool(false)
["client_info"]=>
string(%d) "%s"
["client_version"]=>
["error"]=>
string(0) ""
["error_list"]=>
- NULL
+ bool(false)
["field_count"]=>
- NULL
+ bool(false)
["host_info"]=>
- NULL
+ bool(false)
["info"]=>
- NULL
+ bool(false)
["insert_id"]=>
- NULL
+ bool(false)
["server_info"]=>
- NULL
+ bool(false)
["server_version"]=>
- NULL
+ bool(false)
["stat"]=>
NULL
["sqlstate"]=>
- NULL
+ bool(false)
["protocol_version"]=>
- NULL
+ bool(false)
["thread_id"]=>
- NULL
+ bool(false)
["warning_count"]=>
- NULL
+ bool(false)
}
Done
if (method_exists($mysql, 'set_charset')) {
$x[0] = @$mysql->set_charset('utf8');
} else {
- $x[0] = NULL;
+ $x[0] = false;
}
$x[1] = @$mysql->query("SELECT 'foo' FROM DUAL");
--EXPECT--
array(4) {
[0]=>
- NULL
+ bool(false)
[1]=>
- NULL
+ bool(false)
[2]=>
bool(true)
[3]=>
--- /dev/null
+--TEST--
+mysqli_prepare() called on a closed connection should return FALSE (bug #75448)
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifemb.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+require_once 'connect.inc';
+$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+mysqli_close($link);
+$stmt = mysqli_prepare($link, 'SELECT VERSION()');
+var_dump($stmt);
+?>
+--EXPECTF--
+Warning: mysqli_prepare(): Couldn't fetch mysqli in %s on line %d
+bool(false)
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_affected_rows($link)))
- printf("[033] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_affected_rows($link)))
+ printf("[033] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
require_once("clean_table.inc");
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
require_once("connect.inc");
$mysqli = new mysqli();
- if (NULL !== ($tmp = @$mysqli->affected_rows))
- printf("[000a] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->affected_rows))
+ printf("[000a] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$mysqli->close();
- if (NULL !== ($tmp = @$mysqli->affected_rows))
- printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->affected_rows))
+ printf("[026] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
require_once("clean_table.inc");
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_autocommit($link, false)))
- printf("[033] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_autocommit($link, false)))
+ printf("[033] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
$mysqli->close();
- if (NULL !== ($tmp = @$mysqli->autocommit( false)))
- printf("[030] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->autocommit( false)))
+ printf("[030] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
require_once("clean_table.inc");
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db)))
+ printf("[018] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[019] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_character_set_name($link)))
- printf("[013] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_character_set_name($link)))
+ printf("[013] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
/* Make sure that the function alias exists */
if (!is_null($tmp = @mysqli_character_set_name()))
print "done!";
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
$mysqli->close();
- if (NULL !== ($tmp = @$mysqli->character_set_name()))
- printf("[013] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->character_set_name()))
+ printf("[013] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
/* Make sure that the function alias exists */
- if (!is_null($tmp = @$mysqli->character_set_name()))
- printf("[014] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->character_set_name()))
+ printf("[014] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
Without RS
Class variables:
-affected_rows = 'NULL'
-client_info = 'NULL'
+affected_rows = 'false'
+client_info = 'false'
client_version = '%s'
connect_errno = '%s'
connect_error = ''%s'
-errno = 'NULL'
-error = 'NULL'
-error_list = 'NULL'
-field_count = 'NULL'
-host_info = 'NULL'
-info = 'NULL'
-insert_id = 'NULL'
-protocol_version = 'NULL'
-server_info = 'NULL'
-server_version = 'NULL'
-sqlstate = 'NULL'
-stat = 'NULL'
-thread_id = 'NULL'
-warning_count = 'NULL'
+errno = 'false'
+error = 'false'
+error_list = 'false'
+field_count = 'false'
+host_info = 'false'
+info = 'false'
+insert_id = 'false'
+protocol_version = 'false'
+server_info = 'false'
+server_version = 'false'
+sqlstate = 'false'
+stat = 'false'
+thread_id = 'false'
+warning_count = 'false'
Object variables:
-affected_rows = 'NULL'
-client_info = 'NULL'
+affected_rows = 'false'
+client_info = 'false'
client_version = '%s'
connect_errno = '%s'
connect_error = '%s'
-errno = 'NULL'
-error = 'NULL'
-error_list = 'NULL'
-field_count = 'NULL'
-host_info = 'NULL'
-info = 'NULL'
-insert_id = 'NULL'
-server_info = 'NULL'
-server_version = 'NULL'
-stat = 'NULL'
-sqlstate = 'NULL'
-protocol_version = 'NULL'
-thread_id = 'NULL'
-warning_count = 'NULL'
+errno = 'false'
+error = 'false'
+error_list = 'false'
+field_count = 'false'
+host_info = 'false'
+info = 'false'
+insert_id = 'false'
+server_info = 'false'
+server_version = 'false'
+stat = 'false'
+sqlstate = 'false'
+protocol_version = 'false'
+thread_id = 'false'
+warning_count = 'false'
Magic, magic properties:
-mysqli->affected_rows = ''/NULL (''/NULL)
+mysqli->affected_rows = ''/boolean (''/boolean)
Warning: assert(): assert(@mysqli_get_client_info() === @$mysqli->client_info) failed in %s on line %d
-mysqli->client_info = ''/NULL ('%s'/%s)
+mysqli->client_info = ''/boolean ('%s'/%s)
mysqli->client_version = '%s'/integer ('%s'/integer)
-mysqli->errno = ''/NULL (''/NULL)
-mysqli->error = ''/NULL (''/NULL)
-mysqli->field_count = ''/NULL (''/NULL)
-mysqli->insert_id = ''/NULL (''/NULL)
-mysqli->sqlstate = ''/NULL (''/NULL)
-mysqli->host_info = ''/NULL (''/NULL)
-mysqli->info = ''/NULL (''/NULL)
+mysqli->errno = ''/boolean (''/boolean)
+mysqli->error = ''/boolean (''/boolean)
+mysqli->field_count = ''/boolean (''/boolean)
+mysqli->insert_id = ''/boolean (''/boolean)
+mysqli->sqlstate = ''/boolean (''/boolean)
+mysqli->host_info = ''/boolean (''/boolean)
+mysqli->info = ''/boolean (''/boolean)
Warning: assert(): assert(@mysqli_thread_id($mysqli) > @$mysqli->thread_id) failed in %s on line %d
-mysqli->thread_id = ''/NULL (''/NULL)
-mysqli->protocol_version = ''/NULL (''/NULL)
-mysqli->server_info = ''/NULL (''/NULL)
-mysqli->server_version = ''/NULL (''/NULL)
-mysqli->warning_count = ''/NULL (''/NULL)
+mysqli->thread_id = ''/boolean (''/boolean)
+mysqli->protocol_version = ''/boolean (''/boolean)
+mysqli->server_info = ''/boolean (''/boolean)
+mysqli->server_version = ''/boolean (''/boolean)
+mysqli->warning_count = ''/boolean (''/boolean)
Access to undefined properties:
mysqli->unknown = ''
With RS
Class variables:
-affected_rows = 'NULL'
-client_info = 'NULL'
+affected_rows = 'false'
+client_info = 'false'
client_version = '%s'
connect_errno = '%s'
connect_error = '%s'
-errno = 'NULL'
-error = 'NULL'
-error_list = 'NULL'
-field_count = 'NULL'
-host_info = 'NULL'
-info = 'NULL'
-insert_id = 'NULL'
-protocol_version = 'NULL'
-server_info = 'NULL'
-server_version = 'NULL'
-sqlstate = 'NULL'
-stat = 'NULL'
-thread_id = 'NULL'
-warning_count = 'NULL'
+errno = 'false'
+error = 'false'
+error_list = 'false'
+field_count = 'false'
+host_info = 'false'
+info = 'false'
+insert_id = 'false'
+protocol_version = 'false'
+server_info = 'false'
+server_version = 'false'
+sqlstate = 'false'
+stat = 'false'
+thread_id = 'false'
+warning_count = 'false'
Object variables:
-affected_rows = 'NULL'
-client_info = 'NULL'
+affected_rows = 'false'
+client_info = 'false'
client_version = '%s'
connect_errno = '%s'
connect_error = '%s'
-errno = 'NULL'
-error = 'NULL'
-error_list = 'NULL'
-field_count = 'NULL'
-host_info = 'NULL'
-info = 'NULL'
-insert_id = 'NULL'
-server_info = 'NULL'
-server_version = 'NULL'
-stat = 'NULL'
-sqlstate = 'NULL'
-protocol_version = 'NULL'
-thread_id = 'NULL'
-warning_count = 'NULL'
+errno = 'false'
+error = 'false'
+error_list = 'false'
+field_count = 'false'
+host_info = 'false'
+info = 'false'
+insert_id = 'false'
+server_info = 'false'
+server_version = 'false'
+stat = 'false'
+sqlstate = 'false'
+protocol_version = 'false'
+thread_id = 'false'
+warning_count = 'false'
Magic, magic properties:
-mysqli->affected_rows = ''/NULL (''/NULL)
+mysqli->affected_rows = ''/boolean (''/boolean)
Warning: assert(): assert(@mysqli_get_client_info() === @$mysqli->client_info) failed in %s on line %d
-mysqli->client_info = ''/NULL ('%s'/%s)
+mysqli->client_info = ''/boolean ('%s'/%s)
mysqli->client_version = '%s'/integer ('%s'/integer)
-mysqli->errno = ''/NULL (''/NULL)
-mysqli->error = ''/NULL (''/NULL)
-mysqli->field_count = ''/NULL (''/NULL)
-mysqli->insert_id = ''/NULL (''/NULL)
-mysqli->sqlstate = ''/NULL (''/NULL)
-mysqli->host_info = ''/NULL (''/NULL)
-mysqli->info = ''/NULL (''/NULL)
+mysqli->errno = ''/boolean (''/boolean)
+mysqli->error = ''/boolean (''/boolean)
+mysqli->field_count = ''/boolean (''/boolean)
+mysqli->insert_id = ''/boolean (''/boolean)
+mysqli->sqlstate = ''/boolean (''/boolean)
+mysqli->host_info = ''/boolean (''/boolean)
+mysqli->info = ''/boolean (''/boolean)
Warning: assert(): assert(@mysqli_thread_id($mysqli) > @$mysqli->thread_id) failed in %s on line %d
-mysqli->thread_id = ''/NULL (''/NULL)
-mysqli->protocol_version = ''/NULL (''/NULL)
-mysqli->server_info = ''/NULL (''/NULL)
-mysqli->server_version = ''/NULL (''/NULL)
-mysqli->warning_count = ''/NULL (''/NULL)
+mysqli->thread_id = ''/boolean (''/boolean)
+mysqli->protocol_version = ''/boolean (''/boolean)
+mysqli->server_info = ''/boolean (''/boolean)
+mysqli->server_version = ''/boolean (''/boolean)
+mysqli->warning_count = ''/boolean (''/boolean)
Access to undefined properties:
mysqli->unknown = ''
Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation):
mysqli->connect_error = '%s'/%s)
mysqli->connect_errno = '%s'/integer ('%s'/integer)
-done!
\ No newline at end of file
+done!
if (true !== $tmp)
printf("[005] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
- if (!is_null($tmp = @mysqli_query($link, "SELECT 1")))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_query($link, "SELECT 1")))
+ printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
if (true !== $tmp)
printf("[003] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
- if (!is_null($tmp = @$mysqli->close()))
- printf("[004] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->close()))
+ printf("[004] Expecting false got %s/%s\n", gettype($tmp), $tmp);
- if (!is_null($tmp = @$mysqli->query("SELECT 1")))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->query("SELECT 1")))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = @mysqli_commit($link)))
- printf("[014] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_commit($link)))
+ printf("[014] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
require_once("clean_table.inc");
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
$link = NULL;
$mysqli = new mysqli();
- if (!is_null($tmp = @$mysqli->commit())) {
- printf("[013] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->commit())) {
+ printf("[013] Expecting false got %s/%s\n", gettype($tmp), $tmp);
}
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
$mysqli->close();
- if (NULL !== ($tmp = @$mysqli->commit())) {
- printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$mysqli->commit())) {
+ printf("[017] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
}
print "done!";
Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d
Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-_=]+ in %s on line %d
-done!
\ No newline at end of file
+done!
--TEST--
new mysqli()
--SKIPIF--
-<?php
+<?php
require_once('skipif.inc');
-require_once('skipifemb.inc');
+require_once('skipifemb.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
// We had long discussions on this and found that the ext/mysqli API as
// such is broken. As we can't fix it, we document how it has behaved from
// the first day on. And that's: no connection.
- if (NULL !== ($tmp = @$mysqli->query('SELECT 1'))) {
+ if (false !== ($tmp = @$mysqli->query('SELECT 1'))) {
printf("[013] There shall be no connection!\n");
$mysqli->close();
}
// We had long discussions on this and found that the ext/mysqli API as
// such is broken. As we can't fix it, we document how it has behaved from
// the first day on. And that's: no connection.
- if (NULL !== ($tmp = @$mysqli->query('SELECT 1'))) {
+ if (false !== ($tmp = @$mysqli->query('SELECT 1'))) {
printf("[011] There shall be no connection!\n");
$mysqli->close();
}
Warning: mysqli::__construct(): (%s/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) in %s on line %d
... and now Exceptions
Access denied for user '%s'@'%s' (using password: %s)
-done!
\ No newline at end of file
+done!
mysqli_free_result($res);
- if (NULL !== ($tmp = mysqli_data_seek($res, 1)))
- printf("[013] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_data_seek($res, 1)))
+ printf("[013] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
Warning: mysqli_data_seek(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d
Warning: mysqli_data_seek(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
$host, $user, $db, $port, $socket);
$res = new mysqli_result($mysqli);
- if (NULL !== ($tmp = @$res->data_seek(0)))
- printf("[002] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$res->data_seek(0)))
+ printf("[002] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$res = $mysqli->query('SELECT * FROM test ORDER BY id LIMIT 4', MYSQLI_STORE_RESULT))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
$res->free_result();
- if (NULL !== ($tmp = $res->data_seek(1)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->data_seek(1)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
$mysqli->close();
Warning: mysqli_result::data_seek(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d
Warning: mysqli_result::data_seek(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_dump_debug_info($link)))
- printf("[005] Expecting NULL, got %s/%s\n",
+ if (false !== ($tmp = mysqli_dump_debug_info($link)))
+ printf("[005] Expecting NULL, got %s/%s, [%d] %s\n",
gettype($tmp), $tmp,
mysqli_errno($link), mysqli_error($link));
?>
--EXPECTF--
Warning: mysqli_dump_debug_info(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
$mysqli->close();
- if (NULL !== ($tmp = $mysqli->dump_debug_info()))
- printf("[004] Expecting NULL, got %s/%s, [%d] %s\n",
+ if (false !== ($tmp = $mysqli->dump_debug_info()))
+ printf("[004] Expecting false, got %s/%s, [%d] %s\n",
gettype($tmp), $tmp,
$mysqli->errno, $mysqli->error);
?>
--EXPECTF--
Warning: mysqli::dump_debug_info(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
int(%d)
Warning: mysqli_errno(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
int(%d)
Warning: main(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
?>
--EXPECTF--
Warning: mysqli_error(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
?>
--EXPECTF--
Warning: main(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
string(%d) "Table 'няма_такава_таблица' doesn't exist"
Warning: mysqli_error(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
done!
mysqli_close($link);
- if (null !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
printf("[016] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
Warning: mysqli_fetch_all(): Mode can be only MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC or MYSQLI_FETCH_BOTH in %s on line %d
Warning: mysqli_fetch_array(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (null !== ($tmp = $res->fetch_array(MYSQLI_ASSOC)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->fetch_array(MYSQLI_ASSOC)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_result::fetch_all(): Mode can be only MYSQLI_FETCH_NUM, MYSQLI_FETCH_ASSOC or MYSQLI_FETCH_BOTH in %s on line %d
Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (null !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d
Warning: mysqli_fetch_array(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
$mysqli->close();
- if (null !== ($tmp = $res->fetch_array(MYSQLI_ASSOC)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->fetch_array(MYSQLI_ASSOC)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_result::fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d
Warning: mysqli_result::fetch_array(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_free_result($res);
- if (NULL !== ($tmp = mysqli_fetch_assoc($res)))
- printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_assoc($res)))
+ printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
}
Warning: mysqli_fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
- if (!is_null($tmp = @$res->fetch_assoc()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$res->fetch_assoc()))
+ printf("[001] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
$res->free_result();
- if (NULL !== ($tmp = $res->fetch_assoc()))
- printf("[008] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->fetch_assoc()))
+ printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
}
Warning: mysqli_result::fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_free_result($res);
// Read http://bugs.php.net/bug.php?id=42344 on defaults!
- if (NULL !== ($tmp = mysqli_fetch_field($res)))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_field($res)))
+ printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_free_result($res);
- if (NULL !== ($tmp = mysqli_fetch_field_direct($res, 0)))
- printf("Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_field_direct($res, 0)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
bool(false)
Warning: mysqli_fetch_field_direct(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
$res->free_result();
- if (NULL !== ($tmp = $res->fetch_field_direct(0)))
- printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->fetch_field_direct(0)))
+ printf("[007] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
$mysqli->close();
print "done!";
bool(false)
Warning: mysqli_result::fetch_field_direct(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
// Note: no SQL type tests, internally the same function gets used as for mysqli_fetch_array() which does a lot of SQL type test
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
- if (!is_null($tmp = @$res->fetch_field()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$res->fetch_field()))
+ printf("[001] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
$res->free_result();
- if (NULL !== ($tmp = $res->fetch_field()))
- printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = $res->fetch_field()))
+ printf("[007] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
$mysqli->close();
print "done!";
mysqli_free_result($res);
- if (NULL !== ($tmp = mysqli_fetch_fields($res)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_fetch_fields($res)))
+ printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
bool(false)
Warning: mysqli_fetch_lengths(): Couldn't fetch mysqli_result in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
NULL
Warning: main(): Property access is not allowed yet in %s on line %d
-NULL
+bool(false)
done!
}
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
- }
+ }
try {
$obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a'));
}
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
- }
+ }
$obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a', 'b'));
if (($obj->ID !== "5") || ($obj->label !== "e") || ($obj->a !== 'a') || ($obj->b !== 'b') || (get_class($obj) != 'mysqli_fetch_object_construct')) {
NULL
NULL
[E_WARNING] mysqli_fetch_object(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
[0] Argument 3 passed to mysqli_fetch_object() must be of the type array, string given in %s on line %d
Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
$mysqli = new mysqli();
$res = @new mysqli_result($mysqli);
- if (!is_null($tmp = @$res->fetch_object()))
- printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @$res->fetch_object()))
+ printf("[001] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
NULL
NULL
[E_WARNING] mysqli_fetch_object(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
Fatal error: Class 'this_class_does_not_exist' not found in %s on line %d
NULL
Warning: mysqli_fetch_row(): Couldn't fetch mysqli_result in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
int(3)
Warning: mysqli_field_count(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
}
Warning: mysqli_field_seek(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
done!
int(0)
Warning: mysqli_field_tell(): Couldn't fetch mysqli_result in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
b
Warning: mysqli_free_result(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
c
bool(false)
%s(0) ""
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_get_charset($link)))
- printf("[023] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_get_charset($link)))
+ printf("[023] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
?>
--EXPECTF--
Warning: mysqli_insert_id(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
Strict Standards: mysqli_next_result(): There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method in %s on line %d
Warning: mysqli_more_results(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
done!
[010] 7
Warning: mysqli_multi_query(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
done!
Strict Standards: mysqli_next_result(): There is no next result set. Please, call mysqli_more_results()/mysqli::more_results() to check whether to call this function/method in %s on line %d
Warning: mysqli_next_result(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
done!
mysqli_free_result($res);
- if ($test_free && (NULL !== ($tmp = mysqli_num_fields($res))))
- printf("[%03d] Expecting NULL, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+ if ($test_free && (false !== ($tmp = mysqli_num_fields($res))))
+ printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
}
func_test_mysqli_num_fields($link, "SELECT 1 AS a", 1, 5);
?>
--EXPECTF--
Warning: mysqli_num_fields(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_free_result($res);
- if ($test_free && (NULL !== ($tmp = mysqli_num_rows($res))))
- printf("[%03d] Expecting NULL, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
+ if ($test_free && (false !== ($tmp = mysqli_num_rows($res))))
+ printf("[%03d] Expecting false, got %s/%s\n", $offset + 2, gettype($tmp), $tmp);
}
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
Warning: mysqli_num_rows(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d
-done!
\ No newline at end of file
+done!
var_dump("MYSQLI_OPT_LOCAL_INFILE", mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1));
var_dump("MYSQLI_INIT_COMMAND", mysqli_options($link, MYSQLI_INIT_COMMAND, array('SET AUTOCOMMIT=0', 'SET AUTOCOMMIT=1')));
-
if (!$link2 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[006] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
$host, $user, $db, $port, $socket);
/* mysqli_real_connect() */
var_dump("MYSQLI_CLIENT_SSL", mysqli_options($link, MYSQLI_CLIENT_SSL, 'not a mysqli_option'));
-
+
mysqli_close($link);
echo "Link closed";
Link closed
Warning: mysqli_options(): Couldn't fetch mysqli in %s line %d
%s(19) "MYSQLI_INIT_COMMAND"
-NULL
+bool(false)
done!
mysqli_close($link);
- if (!is_null($tmp = mysqli_ping($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_ping($link)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
bool(true)
Warning: mysqli_ping(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_query($link, "SELECT id FROM test")))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_query($link, "SELECT id FROM test")))
+ printf("[011] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
string(1) "a"
Warning: mysqli_query(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_query($link, "SELECT id FROM test")))
- printf("[014] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_query($link, "SELECT id FROM test")))
+ printf("[014] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
@mysqli_close($link);
}
- if (NULL !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
- printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)))
+ printf("[026] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_real_connect(): (%s/%d): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d
object(mysqli)#%d (%d) {
["affected_rows"]=>
- NULL
+ bool(false)
["client_info"]=>
%s
["client_version"]=>
["error"]=>
%s
["error_list"]=>
- NULL
+ bool(false)
["field_count"]=>
- NULL
+ bool(false)
["host_info"]=>
- NULL
+ bool(false)
["info"]=>
- NULL
+ bool(false)
["insert_id"]=>
- NULL
+ bool(false)
["server_info"]=>
- NULL
+ bool(false)
["server_version"]=>
- NULL
+ bool(false)
["stat"]=>
- NULL
+ bool(false)
["sqlstate"]=>
- NULL
+ bool(false)
["protocol_version"]=>
- NULL
+ bool(false)
["thread_id"]=>
- NULL
+ bool(false)
["warning_count"]=>
- NULL
+ bool(false)
}
Warning: mysqli_real_connect(): Couldn't fetch mysqli in %s on line %d
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_real_escape_string($link, 'foo')))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_real_escape_string($link, 'foo')))
+ printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
/* Make sure that the function alias exists */
if (NULL !== ($tmp = @mysqli_escape_string()))
?>
--EXPECTF--
Warning: mysqli_real_escape_string(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_real_escape_string($link, 'foo')))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_real_escape_string($link, 'foo')))
+ printf("[018] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
?>
--EXPECTF--
Warning: mysqli_real_escape_string(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_real_query($link, "SELECT id FROM test")))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_real_query($link, "SELECT id FROM test")))
+ printf("[011] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
}
Warning: mysqli_real_query(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
["field_count"]=>
NULL
["lengths"]=>
- NULL
+ bool(false)
["num_rows"]=>
NULL
["type"]=>
- NULL
+ bool(false)
}
}
array(1) refcount(2){
mysqli_close($link);
- if (!is_null($tmp = mysqli_rollback($link)))
- printf("[014] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_rollback($link)))
+ printf("[014] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!\n";
?>
?>
--EXPECTF--
Warning: mysqli_rollback(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
$current_db = $row['dbname'];
- mysqli_report(MYSQLI_REPORT_OFF);
+ mysqli_report(MYSQLI_REPORT_OFF);
mysqli_select_db($link, 'I can not imagine that this database exists');
mysqli_report(MYSQLI_REPORT_ERROR);
if (strtolower($row['dbname']) != strtolower($current_db))
printf("[017] Current DB should not change if set fails\n");
-
+
if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
printf("[018] [%d] %s\n");
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_select_db($link, $db)))
- printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_select_db($link, $db)))
+ printf("[019] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!\n";
?>
<?php require_once("clean_table.inc"); ?>
--EXPECTF--
Warning: mysqli_select_db(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_set_charset($link, $new_charset)))
- printf("[016] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_set_charset($link, $new_charset)))
+ printf("[019] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
bool(false)
Warning: mysqli_set_opt(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
%s(5) "00000"
Warning: mysqli_sqlstate(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
mysqli_close($link);
- if (!is_null($tmp = mysqli_stat($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stat($link)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
--EXPECTF--
Warning: mysqli_stat(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_stmt_close($stmt);
- if (!is_null($tmp = mysqli_stmt_affected_rows($stmt)))
- printf("[047] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_affected_rows($stmt)))
+ printf("[047] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
$stmt->close();
foreach ($valid_attr as $k => $attr) {
- if (!is_null($tmp = @mysqli_stmt_attr_get($stmt, $attr))) {
- printf("[007] Expecting NULL/NULL, got %s/%s for attribute %s/%s\n",
+ if (false !== ($tmp = @mysqli_stmt_attr_get($stmt, $attr))) {
+ printf("[007] Expecting false, got %s/%s for attribute %s/%s\n",
gettype($tmp), $tmp, $k, $attr);
}
}
$stmt = mysqli_stmt_init($link);
- if (!is_null($tmp = @mysqli_stmt_attr_set($stmt, 0, 0)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, 0, 0)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
$stmt->prepare("SELECT * FROM test");
$label = null;
$foo = null;
- if (!is_null($tmp = mysqli_stmt_bind_result($stmt, $id)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_bind_result($stmt, $id)))
+ printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 1"))
printf("[004] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// Yes, amazing, eh? AFAIK a work around of a constructor bug...
- if (!is_null($tmp = mysqli_stmt_close($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_close($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
if (true !== ($tmp = mysqli_stmt_close($stmt)))
printf("[006] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp);
- if (!is_null($tmp = mysqli_stmt_close($stmt)))
- printf("[007] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_close($stmt)))
+ printf("[007] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$stmt = mysqli_stmt_init($link))
printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
in %s on line %d
Warning: mysqli_stmt_close(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (!is_null($tmp = mysqli_stmt_data_seek($stmt, 1)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_data_seek($stmt, 1)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id FROM test ORDER BY id"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_data_seek($stmt, 0)))
- printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_data_seek($stmt, 0)))
+ printf("[017] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
int(1)
Warning: mysqli_stmt_data_seek(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_errno($stmt)))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_errno($stmt)))
+ printf("[011] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
?>
--EXPECTF--
Warning: mysqli_stmt_errno(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_error($stmt)))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_error($stmt)))
+ printf("[011] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
?>
--EXPECTF--
Warning: mysqli_stmt_error(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_execute($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_execute($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (mysqli_stmt_prepare($stmt, "SELECT i_do_not_exist_believe_me FROM test ORDER BY id"))
printf("[005] Statement should have failed!\n");
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_execute($stmt)))
- printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_execute($stmt)))
+ printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id FROM test ORDER BY id LIMIT 1"))
printf("[007] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_execute($stmt)))
- printf("[028] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_execute($stmt)))
+ printf("[028] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
[027] Expecting boolean/false, got boolean/1
Warning: mysqli_stmt_execute(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_fetch($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_fetch($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 2"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_fetch($stmt)))
- printf("[016] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_fetch($stmt)))
+ printf("[016] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
[014] [%d] Commands out of sync; you can't run this command now
Warning: mysqli_stmt_fetch(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
require('table.inc');
$stmt = mysqli_stmt_init($link);
- if (!is_null($tmp = mysqli_stmt_field_count($stmt)))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_field_count($stmt)))
+ printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (mysqli_stmt_prepare($stmt, ''))
printf("[004] Prepare should fail for an empty statement\n");
- if (!is_null($tmp = mysqli_stmt_field_count($stmt)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (false !== ($tmp = mysqli_stmt_field_count($stmt)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, 'SELECT 1'))
printf("[006] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
if (mysqli_stmt_prepare($stmt, 'SELECT id FROM test'))
printf("[020] Prepare should fail, statement has been closed\n");
- if (!is_null($tmp = mysqli_stmt_field_count($stmt)))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+
+ if (false !== ($tmp = mysqli_stmt_field_count($stmt)))
+ printf("[021] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
Warning: mysqli_stmt_prepare(): Couldn't fetch mysqli_stmt in %s on line %d
Warning: mysqli_stmt_field_count(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_free_result($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_free_result($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_free_result($stmt)))
- printf("[015] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_free_result($stmt)))
+ printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
in %s on line %d
Warning: mysqli_stmt_free_result(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_fetch($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
+ if (false !== ($tmp = mysqli_stmt_fetch($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 2"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_fetch($stmt)))
- printf("[011] Expecting NULL, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
+ if (false !== ($tmp = mysqli_stmt_fetch($stmt)))
+ printf("[011] Expecting false, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 2"))
printf("[012] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = mysqli_stmt_get_result($stmt)))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
+ if (false !== ($tmp = mysqli_stmt_get_result($stmt)))
+ printf("[018] Expecting false, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 2"))
printf("[019] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_fetch($stmt)))
- printf("[042] Expecting NULL, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
+ if (false !== ($tmp = mysqli_stmt_fetch($stmt)))
+ printf("[042] Expecting false, got %s/%s\n", gettype($tmp), var_export($tmp, 1));
mysqli_close($link);
}
Warning: mysqli_stmt_fetch(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_stmt_close($stmt);
mysqli_close($link);
- if (NULL !== ($res = mysqli_stmt_get_result($stmt))) {
- printf("[022] Expecting NULL got %s/%s\n",
+ if (false !== ($res = mysqli_stmt_get_result($stmt))) {
+ printf("[026] Expecting false got %s/%s\n",
gettype($res), $res);
}
[017] [2014] Commands out of sync; you can't run this command now
Warning: mysqli_stmt_get_result(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
_label_concat
Warning: mysqli_fetch_field(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
Warning: mysqli_fetch_field(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
Warning: mysqli_fetch_field(): Couldn't fetch mysqli_result in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
mysqli_free_result($res);
- if (NULL !== ($tmp = mysqli_data_seek($res, 0)))
- printf("[017] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_data_seek($res, 0)))
+ printf("[017] Expecting false got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($row = $res->fetch_array(MYSQLI_NUM)))
- printf("[018] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($row = $res->fetch_array(MYSQLI_NUM)))
+ printf("[018] Expecting false got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_data_seek($res, 0)))
- printf("[019] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_data_seek($res, 0)))
+ printf("[019] Expecting false got %s/%s\n", gettype($tmp), $tmp);
- if (NULL !== ($row = $res->fetch_array(MYSQLI_NUM)))
- printf("[020] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($row = $res->fetch_array(MYSQLI_NUM)))
+ printf("[020] Expecting false got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = mysqli_stmt_get_warnings($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_get_warnings($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SET sql_mode=''") || !mysqli_stmt_execute($stmt))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_get_warnings($stmt)))
- printf("[018] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_get_warnings($stmt)))
+ printf("[018] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
in %s on line %d
Warning: mysqli_stmt_get_warnings(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_stmt_init($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_init($link)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_stmt_init() expects parameter 1 to be mysqli, object given in %s on line %d
Warning: mysqli_stmt_init(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
require('table.inc');
$stmt = mysqli_stmt_init($link);
- if (NULL !== ($tmp = @mysqli_stmt_insert_id($stmt)))
- printf("[003] Expecting NULL/NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_stmt_insert_id($stmt)))
+ printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test ORDER BY id LIMIT 1") ||
!mysqli_stmt_execute($stmt)) {
?>
--EXPECTF--
Warning: mysqli_stmt_insert_id(): Couldn't fetch mysqli_stmt in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_num_rows($stmt)))
- printf("[056] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_num_rows($stmt)))
+ printf("[056] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
Warning: mysqli_stmt_num_rows(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = mysqli_stmt_param_count($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_param_count($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
function func_test_mysqli_stmt_param_count($stmt, $query, $expected, $offset) {
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_param_count($stmt)))
- printf("[40] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_param_count($stmt)))
+ printf("[40] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
in %s on line %d
Warning: mysqli_stmt_param_count(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_prepare($stmt, "SELECT id FROM test")))
- printf("[007] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_prepare($stmt, "SELECT id FROM test")))
+ printf("[007] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = mysqli_stmt_reset($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_reset($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (true !== ($tmp = mysqli_stmt_prepare($stmt, 'SELECT id FROM test')))
printf("[005] Expecting boolean/true, got %s/%s, [%d] %s\n",
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_reset($stmt)))
- printf("[021] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_reset($stmt)))
+ printf("[021] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
int(1)
Warning: mysqli_stmt_reset(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
if (!$stmt = mysqli_stmt_init($link))
printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = mysqli_stmt_result_metadata($stmt)))
- printf("[004] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_result_metadata($stmt)))
+ printf("[004] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id, label FROM test"))
printf("[005] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_free_result($res);
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_result_metadata($stmt)))
- printf("[017] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_result_metadata($stmt)))
+ printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
/* Check that the function alias exists. It's a deprecated function,
but we have not announce the removal so far, therefore we need to check for it */
}
Warning: mysqli_stmt_result_metadata(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
if (!$stmt = mysqli_stmt_init($link))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
- if (NULL !== ($tmp = mysqli_stmt_sqlstate($stmt)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_stmt_sqlstate($stmt)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "SELECT id FROM test"))
printf("[006] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
mysqli_stmt_close($stmt);
- if (NULL !== ($tmp = mysqli_stmt_sqlstate($stmt)))
- printf("[010] Expecting NULL, got %s/%s\n");
+ if (false !== ($tmp = mysqli_stmt_sqlstate($stmt)))
+ printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
print "done!";
in %s on line %d
Warning: mysqli_stmt_sqlstate(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
require('table.inc');
- if (!is_null($tmp = @mysqli_stmt_store_result(new mysqli_stmt())))
- printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_stmt_store_result(new mysqli_stmt())))
+ printf("[003] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!$stmt = mysqli_stmt_init($link))
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
// stmt object status test
- if (NULL !== ($tmp = @mysqli_stmt_store_result($stmt)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_stmt_store_result($stmt)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
if (!mysqli_stmt_prepare($stmt, "INSERT INTO test(id, label) VALUES (100, 'z')") ||
!mysqli_stmt_execute($stmt))
mysqli_stmt_close($stmt);
mysqli_stmt_close($stmt_buf);
- if (NULL !== ($tmp = @mysqli_stmt_store_result($stmt)))
- printf("[017] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = @mysqli_stmt_store_result($stmt)))
+ printf("[017] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
mysqli_close($link);
mysqli_close($link_buf);
require_once("clean_table.inc");
?>
--EXPECTF--
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_store_result($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_store_result($link)))
+ printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
?>
--EXPECTF--
Warning: mysqli_store_result(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_thread_id($link)))
- printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_thread_id($link)))
+ printf("[005] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
?>
--EXPECTF--
Warning: mysqli_thread_id(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_use_result($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_use_result($link)))
+ printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
Warning: mysqli_data_seek(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d
Warning: mysqli_use_result(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
mysqli_close($link);
- if (NULL !== ($tmp = mysqli_warning_count($link)))
- printf("[010] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
+ if (false !== ($tmp = mysqli_warning_count($link)))
+ printf("[010] Expecting false, got %s/%s\n", gettype($tmp), $tmp);
print "done!";
?>
?>
--EXPECTF--
Warning: mysqli_warning_count(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!