]> granicus.if.org Git - php/commitdiff
[Bug 75448] In case of failure, mysqli::prepare() returns NULL instead of FALSE
authorSergei Morozov <morozov@tut.by>
Sun, 29 Oct 2017 19:16:56 +0000 (12:16 -0700)
committerSara Golemon <pollita@php.net>
Sat, 10 Feb 2018 15:40:47 +0000 (10:40 -0500)
100 files changed:
ext/mysqli/mysqli_prop.c
ext/mysqli/php_mysqli_structs.h
ext/mysqli/tests/bug28817.phpt
ext/mysqli/tests/bug34810.phpt
ext/mysqli/tests/bug36802.phpt
ext/mysqli/tests/bug75448.phpt [new file with mode: 0644]
ext/mysqli/tests/mysqli_affected_rows.phpt
ext/mysqli/tests/mysqli_affected_rows_oo.phpt
ext/mysqli/tests/mysqli_autocommit.phpt
ext/mysqli/tests/mysqli_autocommit_oo.phpt
ext/mysqli/tests/mysqli_change_user.phpt
ext/mysqli/tests/mysqli_character_set_name.phpt
ext/mysqli/tests/mysqli_character_set_name_oo.phpt
ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt
ext/mysqli/tests/mysqli_close.phpt
ext/mysqli/tests/mysqli_close_oo.phpt
ext/mysqli/tests/mysqli_commit.phpt
ext/mysqli/tests/mysqli_commit_oo.phpt
ext/mysqli/tests/mysqli_connect_oo.phpt
ext/mysqli/tests/mysqli_data_seek.phpt
ext/mysqli/tests/mysqli_data_seek_oo.phpt
ext/mysqli/tests/mysqli_dump_debug_info.phpt
ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt
ext/mysqli/tests/mysqli_errno.phpt
ext/mysqli/tests/mysqli_errno_oo.phpt
ext/mysqli/tests/mysqli_error.phpt
ext/mysqli/tests/mysqli_error_oo.phpt
ext/mysqli/tests/mysqli_error_unicode.phpt
ext/mysqli/tests/mysqli_fetch_all.phpt
ext/mysqli/tests/mysqli_fetch_all_oo.phpt
ext/mysqli/tests/mysqli_fetch_array.phpt
ext/mysqli/tests/mysqli_fetch_array_oo.phpt
ext/mysqli/tests/mysqli_fetch_assoc.phpt
ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt
ext/mysqli/tests/mysqli_fetch_field.phpt
ext/mysqli/tests/mysqli_fetch_field_direct.phpt
ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt
ext/mysqli/tests/mysqli_fetch_field_oo.phpt
ext/mysqli/tests/mysqli_fetch_fields.phpt
ext/mysqli/tests/mysqli_fetch_lengths.phpt
ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt
ext/mysqli/tests/mysqli_fetch_object.phpt
ext/mysqli/tests/mysqli_fetch_object_oo.phpt
ext/mysqli/tests/mysqli_fetch_row.phpt
ext/mysqli/tests/mysqli_field_count.phpt
ext/mysqli/tests/mysqli_field_seek.phpt
ext/mysqli/tests/mysqli_field_tell.phpt
ext/mysqli/tests/mysqli_free_result.phpt
ext/mysqli/tests/mysqli_get_charset.phpt
ext/mysqli/tests/mysqli_insert_id.phpt
ext/mysqli/tests/mysqli_more_results.phpt
ext/mysqli/tests/mysqli_multi_query.phpt
ext/mysqli/tests/mysqli_next_result.phpt
ext/mysqli/tests/mysqli_num_fields.phpt
ext/mysqli/tests/mysqli_num_rows.phpt
ext/mysqli/tests/mysqli_options.phpt
ext/mysqli/tests/mysqli_ping.phpt
ext/mysqli/tests/mysqli_query.phpt
ext/mysqli/tests/mysqli_query_unicode.phpt
ext/mysqli/tests/mysqli_real_connect.phpt
ext/mysqli/tests/mysqli_real_escape_string.phpt
ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt
ext/mysqli/tests/mysqli_real_query.phpt
ext/mysqli/tests/mysqli_result_references.phpt
ext/mysqli/tests/mysqli_rollback.phpt
ext/mysqli/tests/mysqli_select_db.phpt
ext/mysqli/tests/mysqli_set_charset.phpt
ext/mysqli/tests/mysqli_set_opt.phpt
ext/mysqli/tests/mysqli_sqlstate.phpt
ext/mysqli/tests/mysqli_stat.phpt
ext/mysqli/tests/mysqli_stmt_affected_rows.phpt
ext/mysqli/tests/mysqli_stmt_attr_get.phpt
ext/mysqli/tests/mysqli_stmt_attr_set.phpt
ext/mysqli/tests/mysqli_stmt_bind_result.phpt
ext/mysqli/tests/mysqli_stmt_close.phpt
ext/mysqli/tests/mysqli_stmt_data_seek.phpt
ext/mysqli/tests/mysqli_stmt_errno.phpt
ext/mysqli/tests/mysqli_stmt_error.phpt
ext/mysqli/tests/mysqli_stmt_execute.phpt
ext/mysqli/tests/mysqli_stmt_fetch.phpt
ext/mysqli/tests/mysqli_stmt_field_count.phpt
ext/mysqli/tests/mysqli_stmt_free_result.phpt
ext/mysqli/tests/mysqli_stmt_get_result.phpt
ext/mysqli/tests/mysqli_stmt_get_result2.phpt
ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt
ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt
ext/mysqli/tests/mysqli_stmt_get_warnings.phpt
ext/mysqli/tests/mysqli_stmt_init.phpt
ext/mysqli/tests/mysqli_stmt_insert_id.phpt
ext/mysqli/tests/mysqli_stmt_num_rows.phpt
ext/mysqli/tests/mysqli_stmt_param_count.phpt
ext/mysqli/tests/mysqli_stmt_prepare.phpt
ext/mysqli/tests/mysqli_stmt_reset.phpt
ext/mysqli/tests/mysqli_stmt_result_metadata.phpt
ext/mysqli/tests/mysqli_stmt_sqlstate.phpt
ext/mysqli/tests/mysqli_stmt_store_result.phpt
ext/mysqli/tests/mysqli_store_result.phpt
ext/mysqli/tests/mysqli_thread_id.phpt
ext/mysqli/tests/mysqli_use_result.phpt
ext/mysqli/tests/mysqli_warning_count.phpt

index f494694302f30e751e937f0399da8ef1ec9fa4a9..160ec551e0451bfc5df04f81d43c3749558cefec 100644 (file)
@@ -32,7 +32,7 @@
 #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; \
        } \
 
@@ -40,7 +40,7 @@
 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);\
index 3a96ccbe797010a8befa128e5dcdc93135cd0d54..e788796f1c8ef1fc9bdfc0aa940a0e74668c8efb 100644 (file)
@@ -256,12 +256,12 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul
        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;\
        }\
 }
 
index 254c0e50dedb08e71a9bca60878011c178f2ac17..5a5e9244764c5ec3404004ed6d8645e63a7a72d5 100644 (file)
@@ -38,5 +38,5 @@ array(2) {
   [1]=>
   %s(3) "bar"
 }
-NULL
-bool(true)
\ No newline at end of file
+bool(false)
+bool(true)
index 43edfd7d50a5ef81300d7f4b41c5658eaec69015..7c36d806bca2943687f8965bdcc194f4efb822e0 100644 (file)
@@ -105,7 +105,7 @@ object(mysqli)#%d (%d) {
 }
 object(mysqli)#%d (%d) {
   ["affected_rows"]=>
-  NULL
+  bool(false)
   ["client_info"]=>
   string(%d) "%s"
   ["client_version"]=>
@@ -119,28 +119,28 @@ object(mysqli)#%d (%d) {
   ["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
index 3694a26db3376cf29c237506c7167d4aaeeb5864..65e6d9a8ce9f02338e398a3fce8663ca606c6a5e 100644 (file)
@@ -17,7 +17,7 @@ Bug #36802 (crashes with with mysqli_set_charset())
        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");
 
@@ -31,9 +31,9 @@ Bug #36802 (crashes with with mysqli_set_charset())
 --EXPECT--
 array(4) {
   [0]=>
-  NULL
+  bool(false)
   [1]=>
-  NULL
+  bool(false)
   [2]=>
   bool(true)
   [3]=>
diff --git a/ext/mysqli/tests/bug75448.phpt b/ext/mysqli/tests/bug75448.phpt
new file mode 100644 (file)
index 0000000..d4b1b05
--- /dev/null
@@ -0,0 +1,19 @@
+--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)
index 958b83cb3cb06b7a2ef543f735f8cd2c381e6f51..a08f897ef9f0f6f1c61fb1b241736e3ba8543c75 100644 (file)
@@ -122,8 +122,8 @@ mysqli_affected_rows()
 
        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!";
 ?>
@@ -132,4 +132,4 @@ mysqli_affected_rows()
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index 6da026bc5ab246f9819b9d1c0b921a6b48940116..2b9b549cb47a2acbc3ed068c66c5af1f9ea9cbd0 100644 (file)
@@ -11,8 +11,8 @@ mysqli->affected_rows
        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",
@@ -101,8 +101,8 @@ mysqli->affected_rows
 
        $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!";
 ?>
@@ -111,4 +111,4 @@ mysqli->affected_rows
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index a93d89f101ece8ec5ba151fd3e87c02844f3900a..fdbedc5fb6de3e6c3a3e2448dce948d48fc0819c 100644 (file)
@@ -134,8 +134,8 @@ mysqli_autocommit()
 
        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!";
 ?>
index 3a5a25779ddd4c83be3cd046534f7329e8c56669..5f61915e2065833e61e54fa02737213abc4f4f2b 100644 (file)
@@ -124,8 +124,8 @@ mysqli->autocommit()
 
        $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!";
 ?>
@@ -134,4 +134,4 @@ mysqli->autocommit()
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index 09009a1368bed2d2da8ff075580c4c9a9414301b..a7ae1d66908416480be2f12c40f88d9b5b2d6c7d 100644 (file)
@@ -105,8 +105,8 @@ require_once('skipifconnectfailure.inc');
 
        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",
index 722facab0013e65b6dec9a5d9899090be9695b1a..8d21b561e01fee8c806a52ced63d7cb40fa7b9db 100644 (file)
@@ -62,8 +62,8 @@ require_once('skipifconnectfailure.inc');
 
        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()))
@@ -72,4 +72,4 @@ require_once('skipifconnectfailure.inc');
        print "done!";
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index 7b71940e59a7fc1d32b7b5200b0a06f4f6abfce1..1a81bdcb3945be6ebb5f4ba3f04c9e789c11998e 100644 (file)
@@ -57,14 +57,14 @@ mysqli_chararcter_set_name(), mysql_client_encoding() [alias]
 
        $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!
index 7e36c6571e4cf7d33224b8009c3b8b60b5c408bf..fe6808e8c0dfb1e220cda377a6d13259fa25eadd 100644 (file)
@@ -144,67 +144,67 @@ require_once('skipifconnectfailure.inc');
 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 = ''
@@ -217,67 +217,67 @@ mysqli->connect_errno = '%s'/integer ('%s'/integer)
 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 = ''
@@ -287,4 +287,4 @@ setting mysqli->unknown, @mysqli_unknown = 'friday'
 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!
index c6ac92dd6092623819c67805a50761957e0f82d1..937137564ef5c2fdca0617df635d3dcc56cf8a5a 100644 (file)
@@ -31,10 +31,10 @@ require_once('skipifconnectfailure.inc');
        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!
index be67f779a88393d0d4c669e9d346b3a286b6dcb9..49189bbab122a0c81073e29154ed9826d31e77c6 100644 (file)
@@ -24,13 +24,13 @@ require_once('skipifconnectfailure.inc');
        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!
index d20ba5dd2366f9f4829fa0b687b176bce8c633f9..ea64ae8065a33b6af434c948cd5d014dfbded934 100644 (file)
@@ -64,8 +64,8 @@ if (!have_innodb($link))
 
        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!";
 ?>
@@ -74,4 +74,4 @@ if (!have_innodb($link))
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index 77bcf412e7a5fa1e655632d7541852a1f0d83007..021f089064f7339cdfae1f4597a5fd2827e1556f 100644 (file)
@@ -21,8 +21,8 @@ if (!have_innodb($link))
        $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)) {
@@ -90,8 +90,8 @@ if (!have_innodb($link))
 
        $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!";
@@ -106,4 +106,4 @@ Warning: mysqli::commit(): Transaction name truncated. Must be only [0-9A-Za-z\-
 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!
index 32dfac0eb251f51c081f884cf61e39736bde1b3e..15520d42b5eea9d654c18292ff5507a5e94a358e 100644 (file)
@@ -1,9 +1,9 @@
 --TEST--
 new mysqli()
 --SKIPIF--
-<?php 
+<?php
 require_once('skipif.inc');
-require_once('skipifemb.inc'); 
+require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --FILE--
@@ -59,7 +59,7 @@ require_once('skipifconnectfailure.inc');
                        // 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();
                        }
@@ -75,7 +75,7 @@ require_once('skipifconnectfailure.inc');
                        // 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();
                        }
@@ -150,4 +150,4 @@ require_once('skipifconnectfailure.inc');
 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!
index 9e2d65047bdef45dd2325622494b2911818ac01b..9bc3b12f73ef76fe34048a81c85e6d639a61de6e 100644 (file)
@@ -56,8 +56,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -71,4 +71,4 @@ require_once('skipifconnectfailure.inc');
 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!
index 0858218a464cf38b49138e77d6ce89a8fca1905c..7fb14f095667f7237f1652fd4be4cffef22519ca 100644 (file)
@@ -20,8 +20,8 @@ require_once('skipifconnectfailure.inc');
                $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));
@@ -65,8 +65,8 @@ require_once('skipifconnectfailure.inc');
 
        $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();
 
@@ -80,4 +80,4 @@ require_once('skipifconnectfailure.inc');
 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!
index bd87ddf0c83b3a776b42921c435d3f95cab0b5c7..b3fbde7fd92e530a6592b4805d8120db4be65c6f 100644 (file)
@@ -32,8 +32,8 @@ require_once('skipifconnectfailure.inc');
 
        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));
 
@@ -41,4 +41,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_dump_debug_info(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 82edef5619114340813a52be267439bd440c1513..a0b5365432b17bc2915acde019ce9d66dcb72524 100644 (file)
@@ -26,8 +26,8 @@ require_once('skipifconnectfailure.inc');
 
        $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);
 
@@ -35,4 +35,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli::dump_debug_info(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 0e9f0496af9eaa6eeaa75e35989ef5706dcd2985..0a9c2453410a981a1ac7ae81ef30ce59de25e38a 100644 (file)
@@ -48,5 +48,5 @@ int(0)
 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!
index 5d5ea2508918e04f2170d081582ba759dbd86a9c..f2fa2529a1b00d5a8b1caa41216c31dcbf5100ca 100644 (file)
@@ -45,5 +45,5 @@ int(0)
 int(%d)
 
 Warning: main(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
index 5e70d59d415d7f0e0d959031842585c8e220d5c9..fd61f0f5d272d55eb727da0711c446e9e9526a4e 100644 (file)
@@ -45,5 +45,5 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_error(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
index 1f0589679de7684a25b8889540b9924bc6fbf55f..d05fd6f383d1c1802c63fad0f8e68445b5af4e48 100644 (file)
@@ -42,5 +42,5 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: main(): Couldn't fetch mysqli in %s on line %d
-NULL
-done!
\ No newline at end of file
+bool(false)
+done!
index e6bf1c9bc7a16f6660802684a476d4cbcb1606ce..f4d8da91101983d7f2c1dd5365ddf74a56ef614e 100644 (file)
@@ -45,5 +45,5 @@ require_once('skipifconnectfailure.inc');
 string(%d) "Table 'няма_такава_таблица' doesn't exist"
 
 Warning: mysqli_error(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
 done!
index dce785af51146bf1601e5ec17eaf427cdea290a2..f9a7ee37704d96dda7f0ac69005baf365f318a22 100644 (file)
@@ -296,8 +296,8 @@ if (!function_exists('mysqli_fetch_all'))
 
        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",
@@ -457,4 +457,4 @@ array(1) {
 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!
index 450c67ecd99f8fc99e84546da0eaac7bb4857a71..9dac357ae1a23bcc2de18d29b14577024478f92e 100644 (file)
@@ -298,8 +298,8 @@ if (!function_exists('mysqli_fetch_all'))
 
        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!";
 ?>
@@ -437,4 +437,4 @@ array(1) {
 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!
index e232898c7b98a3d849aeee64dd18b95e1548e30a..e9dd1602b5d4bd3c83365d45f189ea2fe7d273c3 100644 (file)
@@ -287,8 +287,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -371,4 +371,4 @@ Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQ
 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!
index 0fb1a72e93917987dec8027c560dacfbe250e3ae..b0e223496056ddabcd05005b6e347e83f4660366 100644 (file)
@@ -271,8 +271,8 @@ require_once('skipifconnectfailure.inc');
 
        $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!";
 ?>
@@ -359,4 +359,4 @@ Warning: mysqli_result::fetch_array(): The result type should be either MYSQLI_N
 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!
index 0d721fd5c65cfffa93beb1a7c46ee8f7e54efd0f..6b98b5f51c7423fcc02e2b6740a66775701d0631 100644 (file)
@@ -60,8 +60,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -116,4 +116,4 @@ array(15) {
 }
 
 Warning: mysqli_fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
index 026252b5041dc7f57e03b1cf8f5c717ccffce16c..e4f6465176f1bd676b557e947dd448e9fdc68a23 100644 (file)
@@ -16,8 +16,8 @@ require_once('skipifconnectfailure.inc');
        // 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))
@@ -47,8 +47,8 @@ require_once('skipifconnectfailure.inc');
 
        $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);
 
@@ -83,4 +83,4 @@ array(5) {
 }
 
 Warning: mysqli_result::fetch_assoc(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
index f1d6db05995ac25a68d9f1904c8b6daa1cd28bf4..684795a48ef63b97a8d58842bedcfb7b8843e17f 100644 (file)
@@ -58,8 +58,8 @@ require_once('skipifconnectfailure.inc');
        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));
index d17eb7506fed74a74a2f89b059b54b864d939c2a..be883ef625440d3be54f6927c454fd6bec98126d 100644 (file)
@@ -34,8 +34,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -80,4 +80,4 @@ Warning: mysqli_fetch_field_direct(): Field offset is invalid for resultset in %
 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!
index 4ac84d580aadb716bd2271ca546fe2351d70fba6..c240050e172ffec1ea038a6962bcbeb267735c9c 100644 (file)
@@ -43,8 +43,8 @@ require_once('skipifconnectfailure.inc');
 
        $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!";
@@ -89,4 +89,4 @@ Warning: mysqli_result::fetch_field_direct(): Field offset is invalid for result
 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!
index 039d2b4e313c344071637837c676d8909759768d..2293c9581a8f5a5b1b99a91a2c6035ecb64da776 100644 (file)
@@ -16,8 +16,8 @@ require_once('skipifconnectfailure.inc');
        // 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))
@@ -59,8 +59,8 @@ require_once('skipifconnectfailure.inc');
 
        $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!";
index 854af23302f78ce706cfffbb9f7db94e74dc71b5..c79555c3a15d49e04a84002344aecdfada9bb4f5 100644 (file)
@@ -55,8 +55,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
index 6d0b698ee73d03946073462732658281c10a38a6..85921f800df68f907d637561570a104f8e2f5e46 100644 (file)
@@ -53,5 +53,5 @@ array(2) {
 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!
index 7523621a34df62b06a15b5fd56c1bdd7f03e7c3d..c352bea8a0b52a1395339f69e5f5af9060d6d206 100644 (file)
@@ -46,5 +46,5 @@ array(2) {
 NULL
 
 Warning: main(): Property access is not allowed yet in %s on line %d
-NULL
+bool(false)
 done!
index dff91531ceebba2f30445ae32028c789c4dcd368..09ea19161ac0610cc29a2f004e2c1114adbaccf8 100644 (file)
@@ -67,7 +67,7 @@ require_once('skipifconnectfailure.inc');
                }
        } catch (Throwable $e) {
                echo "Exception: " . $e->getMessage() . "\n";
-       }       
+       }
 
        try {
                $obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a'));
@@ -77,7 +77,7 @@ require_once('skipifconnectfailure.inc');
                }
        } 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')) {
@@ -152,7 +152,7 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr
 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
index 8fac044139b1bf3c848ef563b9d4a14b95ef7fa0..d8c8cc70fdb6b7c10e6b5ee7f3a5cb1e057c047b 100644 (file)
@@ -16,8 +16,8 @@ require_once('skipifconnectfailure.inc');
 
        $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))
@@ -140,6 +140,6 @@ Exception: Too few arguments to function mysqli_fetch_object_construct::__constr
 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
index 59f6cbae3b90959a880cb511dfaa5a668e7d11c5..7ca1b9a132caa04cc1367ccfa1ae23c98e0a62a9 100644 (file)
@@ -55,5 +55,5 @@ array(3) {
 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!
index 9a778c94cb3b80f1d3a1a192b605ad9623b5d7e5..d6581c6699cd13100103b343734baf90dd093a6d 100644 (file)
@@ -59,5 +59,5 @@ int(0)
 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!
index 37b872302f0854ce9c2f05ad55289635e7d99483..c34cf3f6475742a37855d551cb3ed7b8134f20dd 100644 (file)
@@ -251,5 +251,5 @@ object(stdClass)#%d (13) {
 }
 
 Warning: mysqli_field_seek(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
 done!
index 0a89e4591489507c7e5f552fc447f189f80eb29a..9885c1d9d8692fbfdaf61a40df7522c95860ffd9 100644 (file)
@@ -106,5 +106,5 @@ bool(true)
 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!
index 0186fe414723aeda32cfb994783995bddac2ecc5..6cd7778319fde8d32a7800becff2502ba9288beb 100644 (file)
@@ -60,7 +60,7 @@ NULL
 b
 
 Warning: mysqli_free_result(): Couldn't fetch mysqli_result in %s on line %d
-NULL
+bool(false)
 c
 bool(false)
 %s(0) ""
index 8f81b3342eb31c8f9eb07772634a7c043c09433d..537809dd707b6eb3867cb880a614b00249c16de6 100644 (file)
@@ -101,8 +101,8 @@ if (!function_exists('mysqli_get_charset'))
 
        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!";
 ?>
index 549d71d1563dd5617d7249be73cb9be80c4a2292..7d4c0e085c6b2fe248b168b559d66eddc1ed2895 100644 (file)
@@ -136,5 +136,5 @@ require_once('skipifconnectfailure.inc');
 ?>
 --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!
index 4657c8c2f23f708d0fb88a4ba47e113eb789d131..4ce6a19c792842e13cea1cf97b0e245540e0ef5c 100644 (file)
@@ -82,5 +82,5 @@ Strict Standards: mysqli_next_result(): There is no next result set. Please, cal
 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!
index 7cc84a0bf983065575731b4552e408e8e51f0d33..7e4a7971584ff12ffe7a22da4ec137d08bdf39a4 100644 (file)
@@ -130,5 +130,5 @@ Strict Standards: mysqli_next_result(): There is no next result set. Please, cal
 [010] 7
 
 Warning: mysqli_multi_query(): Couldn't fetch mysqli in %s on line %d
-NULL
+bool(false)
 done!
index 37265696a4418362784397d38f806ab17f264b1e..e01f507c20f736fa0cba383b726e02a3f7602bd8 100644 (file)
@@ -84,5 +84,5 @@ Strict Standards: mysqli_next_result(): There is no next result set. Please, cal
 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!
index 4c2510af45022ba3a92ad061012cca1931b7fea6..f891b309c2d3b7f55abab6634ccf2f82262cf96d 100644 (file)
@@ -35,8 +35,8 @@ require_once('skipifconnectfailure.inc');
 
                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);
@@ -54,4 +54,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_num_fields(): Couldn't fetch mysqli_result in %s on line %d
-done!
\ No newline at end of file
+done!
index d5f513ad5174ea4461e78b6f0ba91020607e43b0..c6e646e4c3e9268feb386da78f500d06a6b96318 100644 (file)
@@ -35,8 +35,8 @@ require_once('skipifconnectfailure.inc');
 
                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);
 
        }
 
@@ -86,4 +86,4 @@ Warning: mysqli_num_rows(): Couldn't fetch mysqli_result in %s on line %d
 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!
index 5daaa597fabb459dff5402afa521678f5eca12e1..6d5247943b21e65c123bf255bd7fc5c921a9680d 100644 (file)
@@ -58,7 +58,6 @@ require_once('skipifconnectfailure.inc');
        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);
@@ -104,7 +103,7 @@ require_once('skipifconnectfailure.inc');
 
        /* mysqli_real_connect() */
        var_dump("MYSQLI_CLIENT_SSL",                   mysqli_options($link, MYSQLI_CLIENT_SSL, 'not a mysqli_option'));
-       
+
        mysqli_close($link);
 
        echo "Link closed";
@@ -139,5 +138,5 @@ bool(false)
 Link closed
 Warning: mysqli_options(): Couldn't fetch mysqli in %s line %d
 %s(19) "MYSQLI_INIT_COMMAND"
-NULL
+bool(false)
 done!
index d9a134c0e9ec2577df951eb10fa61c927cb2e5b6..6ddb29efefc77eb1dbebd9ee330920ad22778c1b 100644 (file)
@@ -34,8 +34,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -44,4 +44,4 @@ bool(true)
 bool(true)
 
 Warning: mysqli_ping(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 4b1988b6318e0638cb03350b09abe3e1c08548b8..bfa703bb010e8509aeab10965f6276e31630d078 100644 (file)
@@ -107,8 +107,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -138,4 +138,4 @@ array(1) {
 string(1) "a"
 
 Warning: mysqli_query(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index a7540c5426c4bd8cb78012e2da3ea9a973df6ec8..819a849d94f196e85c28aac849addb3a1465589a 100644 (file)
@@ -87,8 +87,8 @@ mysqli_close($link);
 
        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!";
 ?>
index a67839983876f7303a1162cc6c9ec37e976c8e60..dcc7ad571571b2db52b6fafd73d043c2a46f729d 100644 (file)
@@ -165,8 +165,8 @@ require_once('skipifconnectfailure.inc');
                @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!";
 ?>
@@ -178,7 +178,7 @@ require_once('skipifconnectfailure.inc');
 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"]=>
@@ -192,29 +192,29 @@ object(mysqli)#%d (%d) {
   ["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
index 6c372581e051aaca9131778ea06b2b45358f4f5d..05588cac63948a786d99c646acef18fe4f12ee82 100644 (file)
@@ -44,8 +44,8 @@ require_once('skipifconnectfailure.inc');
 
        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()))
@@ -55,4 +55,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_real_escape_string(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 72d171f9e595dcdb37c51cac408f11a889137e33..b3465ad2b10e855f6e723494a9768aa53bec6cb8 100644 (file)
@@ -74,8 +74,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -85,4 +85,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_real_escape_string(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index efc3eaa29fe25ec6d7f1782ae459d9ddd8b783ea..9b99435d420b260ae3baab5e68b6e12f81ceaff8 100644 (file)
@@ -84,8 +84,8 @@ ver_param;')) {
 
        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!";
 ?>
@@ -110,4 +110,4 @@ array(1) {
 }
 
 Warning: mysqli_real_query(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index e565e184eef97b60a76c2960ad545a1e872264ef..33e5a1f1dae5d34832e8559655fa8d324a5c3d71 100644 (file)
@@ -135,11 +135,11 @@ array(7) refcount(2){
     ["field_count"]=>
     NULL
     ["lengths"]=>
-    NULL
+    bool(false)
     ["num_rows"]=>
     NULL
     ["type"]=>
-    NULL
+    bool(false)
   }
 }
 array(1) refcount(2){
index be49000315067fa3668f3c1adfc8c57bdce29c50..8f2a13b96c0001f4e06443ca054f45eb982eee2b 100644 (file)
@@ -63,8 +63,8 @@ mysqli_rollback()
 
        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";
 ?>
@@ -74,4 +74,4 @@ mysqli_rollback()
 ?>
 --EXPECTF--
 Warning: mysqli_rollback(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index f58a19bea34caecb6515bd1e855343a93be1396f..041b7fbb22b7e5818348711520cd9d9e9c4e8f98 100644 (file)
@@ -67,7 +67,7 @@ require_once('skipifconnectfailure.inc');
 
        $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);
 
@@ -91,7 +91,7 @@ require_once('skipifconnectfailure.inc');
        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");
 
@@ -100,8 +100,8 @@ require_once('skipifconnectfailure.inc');
 
        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";
 ?>
@@ -109,4 +109,4 @@ require_once('skipifconnectfailure.inc');
 <?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!
index ed534fa71e5bd338507f4090787b3fd4a9a5b3e9..df90333867573a7aed3e25ee4c6e35c2191dbbf3 100644 (file)
@@ -116,8 +116,8 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR
 
        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!";
 ?>
index 7c96d5980d635df53319115ae6c105b36a53a6ca..757b8490b739d7b5c092e0b53db6b706c8c1b811 100644 (file)
@@ -65,5 +65,5 @@ bool(true)
 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!
index 56580cda46f8176b110dcee9b418f4466fc10fee..b36291872eb6675063f1d8372f76fa09417ff0a7 100644 (file)
@@ -46,5 +46,5 @@ NULL
 %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!
index f1cd56ccd11f436229cd0402c8c634f9d4fccf98..2507a4c8f84553e9c5d30650f8fe35bcecfe442a 100644 (file)
@@ -30,11 +30,11 @@ require_once('skipifconnectfailure.inc');
 
        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!
index 7fc32f7e61b37cab50c79030bd0652164db37349..1e08f0dec369d11bf1fddbfba4b6b8ff8f381059 100644 (file)
@@ -234,8 +234,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
index a4eb4d0f353bc1da485433bbe079c46af0809db8..d58885e986a58b7945c65510be580b46f8505821 100644 (file)
@@ -53,8 +53,8 @@ require_once('skipifconnectfailure.inc');
        $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);
                }
        }
index c2ddd211984f96e3712ecfd3b006741acca2ccfc..5b53a06222c684cb11e3723316677dcae6e84322 100644 (file)
@@ -41,8 +41,8 @@ require_once('skipifconnectfailure.inc');
 
 
        $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");
 
index 52e9d4b24bd21a3fb60332997cfffa50a629386c..dcd05e5f68fb4f68499a242e5653c7b6e9ad35a9 100644 (file)
@@ -35,8 +35,8 @@ require_once('skipifconnectfailure.inc');
        $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));
index 64e76e54ced76d98d0199c0444c59f53fe729ef5..6ea64e815a19f1f6b68e7e290f6c4144ef0dc204 100644 (file)
@@ -25,8 +25,8 @@ require_once('skipifconnectfailure.inc');
                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));
@@ -34,8 +34,8 @@ require_once('skipifconnectfailure.inc');
        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));
@@ -88,4 +88,4 @@ Warning: mysqli_stmt_close(): invalid object or resource mysqli_stmt
  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!
index a1cebeae80d1bda9f29a599fcc7d9f329ef468fb..f9224eef6258a0470d38849e1cd1a4651b03c0e2 100644 (file)
@@ -24,8 +24,8 @@ require_once('skipifconnectfailure.inc');
        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));
@@ -75,8 +75,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -96,4 +96,4 @@ Warning: mysqli_stmt_data_seek(): Offset must be positive in %s on line %d
 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!
index 070f2514a201a08aaec4317863454293f669ae23..d98a98b87ab866b4ae72923eaf784cc4d4ff3011 100644 (file)
@@ -53,8 +53,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -65,4 +65,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_stmt_errno(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
index e18aa07f321d49c481598b52684601731a8953b7..ad8efef6028ee1099f8154759e5d032f8ece3802 100644 (file)
@@ -53,8 +53,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -65,4 +65,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_stmt_error(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
index 85ae80c51e351a8a1ba0456c18ec8422d0e84265..d97111a6fdee3be8bc7f54f9724ba5bbb2bea497 100644 (file)
@@ -31,15 +31,15 @@ if (mysqli_get_server_version($link) <= 40100) {
                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));
@@ -126,8 +126,8 @@ if (mysqli_get_server_version($link) <= 40100) {
 
        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!";
@@ -147,4 +147,4 @@ bool(true)
 [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!
index 7598ffeb1b27b64cdb9f6e3f3b0a594277f80ab1..4b41c9213d7a4782673109791a710c2ac1d959cc 100644 (file)
@@ -30,8 +30,8 @@ require_once('skipifconnectfailure.inc');
                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));
@@ -73,8 +73,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -95,4 +95,4 @@ Warning: mysqli_stmt_fetch(): invalid object or resource mysqli_stmt
 [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!
index 7dfd3a400cbece238291acf420b08e1cce0cedf9..847fe04a3b9bf3a7ab5a5b150e38e416dad586b9 100644 (file)
@@ -22,13 +22,14 @@ require_once('skipifconnectfailure.inc');
        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));
@@ -74,8 +75,9 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -97,4 +99,4 @@ Warning: mysqli_stmt_bind_param(): Number of variables doesn't match number of p
 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!
index 08b33b795954485215a17ffb417a844b3ca10bac..292905ab633733fc9d6ad5d6fedf03a708850e99 100644 (file)
@@ -30,8 +30,8 @@ require_once('skipifconnectfailure.inc');
                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));
@@ -67,8 +67,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -83,4 +83,4 @@ Warning: mysqli_stmt_free_result(): invalid object or resource mysqli_stmt
  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!
index 58d7c2fa72a7a0af1c2e9bd238250c2aab8aff0b..e8f2843920c3b9ad285ef5e198da87d5984eaad3 100644 (file)
@@ -33,8 +33,8 @@ if (!function_exists('mysqli_stmt_get_result'))
                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));
@@ -58,8 +58,8 @@ if (!function_exists('mysqli_stmt_get_result'))
                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));
@@ -81,8 +81,8 @@ if (!function_exists('mysqli_stmt_get_result'))
                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));
@@ -148,8 +148,8 @@ if (!function_exists('mysqli_stmt_get_result'))
 
        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);
 
@@ -184,4 +184,4 @@ array(2) {
 }
 
 Warning: mysqli_stmt_fetch(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
index 48f7ed8f30db33e0c4787797050a214fd4b82c69..00ed7adee49e5c7e618b31ecb7a1a5bc26e93163 100644 (file)
@@ -144,8 +144,8 @@ if (!function_exists('mysqli_stmt_get_result'))
        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);
        }
 
@@ -173,4 +173,4 @@ NULL
 [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!
index 879e87f0d8912ea177fbc3b18c5e73bd1b49a5ad..febc659167110b475d1268ce9fd4f9ed4d359f68 100644 (file)
@@ -227,11 +227,11 @@ _null
 _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!
index 826d225baee4e12a39e4da6a46a38beebb97df2b..51198523c9ed970b8b12066d8d1728d5724244fb 100644 (file)
@@ -97,19 +97,19 @@ if (!function_exists('mysqli_stmt_get_result'))
 
        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!";
 ?>
index 69755865e911aad1793b8ad8466b50a90ae6e060..1ebe6d051f2133632a3fc146034ce7a666d48931 100644 (file)
@@ -40,8 +40,8 @@ mysqli_query($link, "DROP TABLE IF EXISTS test");
        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));
@@ -92,8 +92,8 @@ mysqli_query($link, "DROP TABLE IF EXISTS test");
 
        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!";
@@ -107,4 +107,4 @@ 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!
\ No newline at end of file
+done!
index 4f09719c87f6a0a115ac0627505864a2f959dd87..b82a855dd2ba374c4d24f9471afced312b69c0cf 100644 (file)
@@ -39,8 +39,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -55,4 +55,4 @@ Warning: mysqli_stmt_close(): invalid object or resource mysqli_stmt
 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!
index c7a5affd9dd200a44eeb24c34809b32d777710c4..e3ef9a25ec27f6f07c6e44f2fb300756dbf58580 100644 (file)
@@ -23,8 +23,8 @@ require_once('skipifconnectfailure.inc');
        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)) {
@@ -73,5 +73,5 @@ require_once('skipifconnectfailure.inc');
 ?>
 --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!
index a1f5e89c7a846e53442397c52648940617b8ff58..5355b3deb7e17710a44153372fe114636345098d 100644 (file)
@@ -101,8 +101,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -115,4 +115,4 @@ require_once('skipifconnectfailure.inc');
 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!
index 3526956898ce2b88aeec28668be5cd9383be8bdc..e847d165f605151613013a1a407a35c8062caa9f 100644 (file)
@@ -24,8 +24,8 @@ require_once('skipifconnectfailure.inc');
        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) {
 
@@ -48,8 +48,8 @@ require_once('skipifconnectfailure.inc');
 
        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);
 
@@ -69,4 +69,4 @@ Warning: mysqli_stmt_param_count(): invalid object or resource mysqli_stmt
  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!
index 3eb576aec3f22f34322469e12feea21fcd07ecc5..d0e38075d9e3f443ac32a5358b43af95492a4ac5 100644 (file)
@@ -41,8 +41,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
index d731da2f5e64357532bc8883f5b4c77d1864af7f..b7ec4e3ed7427e25e113194902b37bc29e405b02 100644 (file)
@@ -30,8 +30,8 @@ require_once('skipifconnectfailure.inc');
        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",
@@ -93,8 +93,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -109,4 +109,4 @@ Warning: mysqli_stmt_reset(): invalid object or resource mysqli_stmt
 int(1)
 
 Warning: mysqli_stmt_reset(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
index 5fd76a26287df83b5d533bf097e6b5fc70027bc7..c53101a09612db1cc9de47fcdbb195f403e73de0 100644 (file)
@@ -24,8 +24,8 @@ require_once('skipifconnectfailure.inc');
        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));
@@ -82,8 +82,8 @@ require_once('skipifconnectfailure.inc');
        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 */
@@ -131,4 +131,4 @@ object(stdClass)#5 (13) {
 }
 
 Warning: mysqli_stmt_result_metadata(): Couldn't fetch mysqli_stmt in %s on line %d
-done!
\ No newline at end of file
+done!
index 5ea35df240d527ed65174065337af73ac7105098..1784106162808c73aef86dcc710a271ed7307a62 100644 (file)
@@ -27,8 +27,8 @@ require_once('skipifconnectfailure.inc');
        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));
@@ -45,8 +45,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
@@ -60,4 +60,4 @@ Warning: mysqli_stmt_sqlstate(): invalid object or resource mysqli_stmt
  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!
index a6411ca93706e7e4fe1b5b87527dec6bd92a26fe..aa292a919870291f883e446e173df36ecf3bcc97 100644 (file)
@@ -21,15 +21,15 @@ require_once('skipifconnectfailure.inc');
 
        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))
@@ -75,8 +75,8 @@ require_once('skipifconnectfailure.inc');
        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);
@@ -87,4 +87,4 @@ require_once('skipifconnectfailure.inc');
        require_once("clean_table.inc");
 ?>
 --EXPECTF--
-done!
\ No newline at end of file
+done!
index c61c124daf3eb02141450be2168611b6fa1e1c35..b87d147e380c2740f8e8492047b114b53cadf0db 100644 (file)
@@ -50,8 +50,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -61,4 +61,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_store_result(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 3a7e1ae5da8cb121f5686c12171c45a2e438abbb..4a71d60f41dfb444577996ce9da1f2d434158322 100644 (file)
@@ -30,8 +30,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -41,4 +41,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_thread_id(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!
index 25d16926a84f017bffd6997e3a376e88081acf4e..190cafa5d5c4318c7c726b1f736e81212289be6b 100644 (file)
@@ -50,8 +50,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -63,4 +63,4 @@ require_once('skipifconnectfailure.inc');
 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!
index cff9c02b1f7ef51dee581060fca477f10a3a8d01..9d59f26e521296071797f941cb3cf273c261b3b6 100644 (file)
@@ -38,8 +38,8 @@ require_once('skipifconnectfailure.inc');
 
        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!";
 ?>
@@ -49,4 +49,4 @@ require_once('skipifconnectfailure.inc');
 ?>
 --EXPECTF--
 Warning: mysqli_warning_count(): Couldn't fetch mysqli in %s on line %d
-done!
\ No newline at end of file
+done!