diff options
Diffstat (limited to 'ext/mysqli')
271 files changed, 861 insertions, 989 deletions
diff --git a/ext/mysqli/TODO b/ext/mysqli/TODO deleted file mode 100644 index c241b9b704..0000000000 --- a/ext/mysqli/TODO +++ /dev/null @@ -1,2 +0,0 @@ -- documentation -- ini-settings diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4 index c700dac819..38a130f4cd 100644 --- a/ext/mysqli/config.m4 +++ b/ext/mysqli/config.m4 @@ -1,5 +1,3 @@ -dnl -dnl $Id$ dnl config.m4 for extension mysqli dnl ext/pdo_mysql/config.m4 also depends on this macro. @@ -31,11 +29,11 @@ AC_DEFUN([PHP_MYSQL_SOCKET_SEARCH], [ PHP_ARG_WITH(mysqli, for MySQLi support, [ --with-mysqli[=FILE] Include MySQLi support. FILE is the path - to mysql_config. If no value or mysqlnd is passed + to mysql_config. If no value or mysqlnd is passed as FILE, the MySQL native driver will be used]) PHP_ARG_ENABLE(embedded_mysqli, whether to enable embedded MySQLi support, -[ --enable-embedded-mysqli +[ --enable-embedded-mysqli MYSQLi: Enable embedded support Note: Does not work with MySQL native driver!], no, no) @@ -65,7 +63,7 @@ elif test "$PHP_MYSQLI" != "no"; then else MYSQL_LIB_CFG='--libs' fi - + if test -x "$MYSQL_CONFIG" && $MYSQL_CONFIG $MYSQL_LIB_CFG > /dev/null 2>&1; then MYSQLI_INCLINE=`$MYSQL_CONFIG --cflags | $SED -e "s/'//g"` MYSQLI_LIBLINE=`$MYSQL_CONFIG $MYSQL_LIB_CFG | $SED -e "s/'//g"` diff --git a/ext/mysqli/config.w32 b/ext/mysqli/config.w32 index 9213931393..5c32db2c40 100644 --- a/ext/mysqli/config.w32 +++ b/ext/mysqli/config.w32 @@ -1,4 +1,3 @@ -// $Id$ // vim:ft=javascript // Note: The extension name is "mysqli", you enable it with "--with-mysqli". diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 2d3b08bcb5..a25bc096ce 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifdef HAVE_CONFIG_H @@ -185,7 +183,7 @@ void php_clear_stmt_bind(MY_STMT *stmt) /* {{{ php_clear_mysql */ void php_clear_mysql(MY_MYSQL *mysql) { if (mysql->hash_key) { - zend_string_release(mysql->hash_key); + zend_string_release_ex(mysql->hash_key, 0); mysql->hash_key = NULL; } if (!Z_ISUNDEF(mysql->li_read)) { @@ -307,8 +305,7 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl obj = Z_MYSQLI_P(object); if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -322,12 +319,11 @@ zval *mysqli_read_property(zval *object, zval *member, int type, void **cache_sl retval = &EG(uninitialized_zval); } } else { - zend_object_handlers *std_hnd = zend_get_std_object_handlers(); - retval = std_hnd->read_property(object, member, type, cache_slot, rv); + retval = zend_std_read_property(object, member, type, cache_slot, rv); } if (member == &tmp_member) { - zval_dtor(member); + zval_ptr_dtor_str(&tmp_member); } return retval; @@ -342,8 +338,7 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache mysqli_prop_handler *hnd = NULL; if (Z_TYPE_P(member) != IS_STRING) { - ZVAL_COPY(&tmp_member, member); - convert_to_string(&tmp_member); + ZVAL_STR(&tmp_member, zval_get_string_func(member)); member = &tmp_member; } @@ -356,12 +351,11 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache if (hnd) { hnd->write_func(obj, value); } else { - zend_object_handlers *std_hnd = zend_get_std_object_handlers(); - std_hnd->write_property(object, member, value, cache_slot); + zend_std_write_property(object, member, value, cache_slot); } if (member == &tmp_member) { - zval_dtor(member); + zval_ptr_dtor_str(&tmp_member); } } /* }}} */ @@ -370,11 +364,11 @@ void mysqli_write_property(zval *object, zval *member, zval *value, void **cache void mysqli_add_property(HashTable *h, const char *pname, size_t pname_len, mysqli_read_t r_func, mysqli_write_t w_func) { mysqli_prop_handler p; - p.name = zend_string_init(pname, pname_len, 1); + p.name = zend_string_init_interned(pname, pname_len, 1); p.read_func = (r_func) ? r_func : mysqli_read_na; p.write_func = (w_func) ? w_func : mysqli_write_na; zend_hash_add_mem(h, p.name, &p, sizeof(mysqli_prop_handler)); - zend_string_release(p.name); + zend_string_release_ex(p.name, 1); } /* }}} */ @@ -386,10 +380,10 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex if ((p = zend_hash_find_ptr(obj->prop_handler, Z_STR_P(member))) != NULL) { switch (has_set_exists) { - case 2: + case ZEND_PROPERTY_EXISTS: ret = 1; break; - case 1: { + case ZEND_PROPERTY_NOT_EMPTY: { zval rv; zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { @@ -398,7 +392,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex } break; } - case 0:{ + case ZEND_PROPERTY_ISSET: { zval rv; zval *value = mysqli_read_property(object, member, BP_VAR_IS, cache_slot, &rv); if (value != &EG(uninitialized_zval)) { @@ -411,8 +405,7 @@ static int mysqli_object_has_property(zval *object, zval *member, int has_set_ex php_error_docref(NULL, E_WARNING, "Invalid value for has_set_exists"); } } else { - zend_object_handlers *std_hnd = zend_get_std_object_handlers(); - ret = std_hnd->has_property(object, member, has_set_exists, cache_slot); + ret = zend_std_has_property(object, member, has_set_exists, cache_slot); } return ret; @@ -424,8 +417,7 @@ HashTable *mysqli_object_get_debug_info(zval *object, int *is_temp) HashTable *retval, *props = obj->prop_handler; mysqli_prop_handler *entry; - ALLOC_HASHTABLE(retval); - ZEND_INIT_SYMTABLE_EX(retval, zend_hash_num_elements(props) + 1, 0); + retval = zend_new_array(zend_hash_num_elements(props) + 1); ZEND_HASH_FOREACH_PTR(props, entry) { zval rv, member; @@ -449,7 +441,7 @@ PHP_MYSQLI_EXPORT(zend_object *) mysqli_objects_new(zend_class_entry *class_type zend_class_entry *mysqli_base_class; zend_object_handlers *handlers; - intern = ecalloc(1, sizeof(mysqli_object) + zend_object_properties_size(class_type)); + intern = zend_object_alloc(sizeof(mysqli_object), class_type); mysqli_base_class = class_type; while (mysqli_base_class->type != ZEND_INTERNAL_CLASS && @@ -501,7 +493,7 @@ static MYSQLND *mysqli_convert_zv_to_mysqlnd(zval * zv) return NULL; } -static MYSQLND_REVERSE_API mysqli_reverse_api = { +static const MYSQLND_REVERSE_API mysqli_reverse_api = { &mysqli_module_entry, mysqli_convert_zv_to_mysqlnd }; @@ -564,24 +556,20 @@ static PHP_GINIT_FUNCTION(mysqli) PHP_MINIT_FUNCTION(mysqli) { zend_class_entry *ce,cex; - zend_object_handlers *std_hnd = zend_get_std_object_handlers(); REGISTER_INI_ENTRIES(); #ifndef MYSQLI_USE_MYSQLND -#if MYSQL_VERSION_ID >= 40000 if (mysql_server_init(0, NULL, NULL)) { return FAILURE; } #endif -#endif - memcpy(&mysqli_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); + memcpy(&mysqli_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); mysqli_object_handlers.offset = XtOffsetOf(mysqli_object, zo); mysqli_object_handlers.free_obj = mysqli_objects_free_storage; mysqli_object_handlers.clone_obj = NULL; mysqli_object_handlers.read_property = mysqli_read_property; mysqli_object_handlers.write_property = mysqli_write_property; - mysqli_object_handlers.get_property_ptr_ptr = std_hnd->get_property_ptr_ptr; mysqli_object_handlers.has_property = mysqli_object_has_property; mysqli_object_handlers.get_debug_info = mysqli_object_get_debug_info; memcpy(&mysqli_object_driver_handlers, &mysqli_object_handlers, sizeof(zend_object_handlers)); @@ -665,7 +653,6 @@ PHP_MINIT_FUNCTION(mysqli) zend_declare_property_null(ce, "num_rows", sizeof("num_rows") - 1, ZEND_ACC_PUBLIC); zend_declare_property_null(ce, "type", sizeof("type") - 1, ZEND_ACC_PUBLIC); mysqli_result_class_entry->get_iterator = php_mysqli_result_get_iterator; - mysqli_result_class_entry->iterator_funcs.funcs = &php_mysqli_result_iterator_funcs; zend_class_implements(mysqli_result_class_entry, 1, zend_ce_traversable); zend_hash_add_ptr(&classes, ce->name, &mysqli_result_properties); @@ -691,9 +678,7 @@ PHP_MINIT_FUNCTION(mysqli) REGISTER_LONG_CONSTANT("MYSQLI_OPT_CONNECT_TIMEOUT", MYSQL_OPT_CONNECT_TIMEOUT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_OPT_LOCAL_INFILE", MYSQL_OPT_LOCAL_INFILE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_INIT_COMMAND", MYSQL_INIT_COMMAND, CONST_CS | CONST_PERSISTENT); -#if MYSQL_VERSION_ID > 40101 || defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_OPT_READ_TIMEOUT", MYSQL_OPT_READ_TIMEOUT, CONST_CS | CONST_PERSISTENT); -#endif #if defined(MYSQLI_USE_MYSQLND) REGISTER_LONG_CONSTANT("MYSQLI_OPT_NET_CMD_BUFFER_SIZE", MYSQLND_OPT_NET_CMD_BUFFER_SIZE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MYSQLI_OPT_NET_READ_BUFFER_SIZE", MYSQLND_OPT_NET_READ_BUFFER_SIZE, CONST_CS | CONST_PERSISTENT); @@ -885,7 +870,6 @@ PHP_MINIT_FUNCTION(mysqli) PHP_MSHUTDOWN_FUNCTION(mysqli) { #ifndef MYSQLI_USE_MYSQLND -#if MYSQL_VERSION_ID >= 40000 #ifdef PHP_WIN32 zend_ulong client_ver = mysql_get_client_version(); /* @@ -899,7 +883,6 @@ PHP_MSHUTDOWN_FUNCTION(mysqli) mysql_server_end(); #endif #endif -#endif zend_hash_destroy(&mysqli_driver_properties); zend_hash_destroy(&mysqli_result_properties); @@ -917,7 +900,7 @@ PHP_MSHUTDOWN_FUNCTION(mysqli) */ PHP_RINIT_FUNCTION(mysqli) { -#if !defined(MYSQLI_USE_MYSQLND) && defined(ZTS) && MYSQL_VERSION_ID >= 40000 +#if !defined(MYSQLI_USE_MYSQLND) && defined(ZTS) if (mysql_thread_init()) { return FAILURE; } @@ -954,7 +937,7 @@ PHP_RSHUTDOWN_FUNCTION(mysqli) { /* check persistent connections, move used to free */ -#if !defined(MYSQLI_USE_MYSQLND) && defined(ZTS) && MYSQL_VERSION_ID >= 40000 +#if !defined(MYSQLI_USE_MYSQLND) && defined(ZTS) mysql_thread_end(); #endif if (MyG(error_msg)) { @@ -995,7 +978,7 @@ PHP_MINFO_FUNCTION(mysqli) /* }}} */ -/* Dependancies */ +/* Dependencies */ static const zend_module_dep mysqli_deps[] = { ZEND_MOD_REQUIRED("spl") #if defined(MYSQLI_USE_MYSQLND) @@ -1312,9 +1295,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags } } - fcc.initialized = 1; fcc.function_handler = ce->constructor; - fcc.calling_scope = zend_get_executed_scope(); fcc.called_scope = Z_OBJCE_P(return_value); fcc.object = Z_OBJ_P(return_value); diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 206f4b820a..40c7d2982d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifdef HAVE_CONFIG_H @@ -544,7 +542,7 @@ mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval *args, unsigned int argc) MYSQLI_REPORT_STMT_ERROR(stmt->stmt); if (rc) { - /* dont close the statement or subsequent usage (for example ->execute()) will lead to crash */ + /* don't close the statement or subsequent usage (for example ->execute()) will lead to crash */ for (i=0; i < var_cnt ; i++) { if (stmt->result.buf[i].val) { efree(stmt->result.buf[i].val); @@ -880,9 +878,11 @@ PHP_FUNCTION(mysqli_stmt_execute) } for (j = i + 1; j < stmt->param.var_cnt; j++) { /* Oops, someone binding the same variable - clone */ - if (Z_TYPE(stmt->param.vars[j]) == Z_TYPE(stmt->param.vars[i]) && + if (Z_ISREF(stmt->param.vars[j]) && Z_REFVAL(stmt->param.vars[j]) == Z_REFVAL(stmt->param.vars[i])) { - SEPARATE_ZVAL(&stmt->param.vars[j]); + /*SEPARATE_ZVAL(&stmt->param.vars[j]);*/ + Z_DELREF_P(&stmt->param.vars[j]); + ZVAL_COPY(&stmt->param.vars[j], Z_REFVAL(stmt->param.vars[j])); break; } } @@ -1179,7 +1179,7 @@ static void php_add_field_properties(zval *value, const MYSQL_FIELD *field) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_field (object result) +/* {{{ proto mixed mysqli_fetch_field(object result) Get column information from a result and return as an object */ PHP_FUNCTION(mysqli_fetch_field) { @@ -1202,7 +1202,7 @@ PHP_FUNCTION(mysqli_fetch_field) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_fields (object result) +/* {{{ proto mixed mysqli_fetch_fields(object result) Return array of objects containing field meta-data */ PHP_FUNCTION(mysqli_fetch_fields) { @@ -1232,7 +1232,7 @@ PHP_FUNCTION(mysqli_fetch_fields) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_field_direct (object result, int offset) +/* {{{ proto mixed mysqli_fetch_field_direct(object result, int offset) Fetch meta-data for a single field */ PHP_FUNCTION(mysqli_fetch_field_direct) { @@ -1261,7 +1261,7 @@ PHP_FUNCTION(mysqli_fetch_field_direct) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_lengths (object result) +/* {{{ proto mixed mysqli_fetch_lengths(object result) Get the length of each output in a result */ PHP_FUNCTION(mysqli_fetch_lengths) { @@ -1293,7 +1293,7 @@ PHP_FUNCTION(mysqli_fetch_lengths) } /* }}} */ -/* {{{ proto array mysqli_fetch_row (object result) +/* {{{ proto array mysqli_fetch_row(object result) Get a result row as an enumerated array */ PHP_FUNCTION(mysqli_fetch_row) { @@ -1394,7 +1394,7 @@ PHP_FUNCTION(mysqli_get_client_version) } /* }}} */ -/* {{{ proto string mysqli_get_host_info (object link) +/* {{{ proto string mysqli_get_host_info(object link) Get MySQL host info */ PHP_FUNCTION(mysqli_get_host_info) { @@ -1714,14 +1714,12 @@ static int mysqli_options_get_option_zval_type(int option) #ifdef MYSQL_OPT_PROTOCOL case MYSQL_OPT_PROTOCOL: #endif /* MySQL 4.1.0 */ -#if MYSQL_VERSION_ID > 40101 || defined(MYSQLI_USE_MYSQLND) case MYSQL_OPT_READ_TIMEOUT: case MYSQL_OPT_WRITE_TIMEOUT: case MYSQL_OPT_GUESS_CONNECTION: case MYSQL_OPT_USE_EMBEDDED_CONNECTION: case MYSQL_OPT_USE_REMOTE_CONNECTION: case MYSQL_SECURE_AUTH: -#endif #ifdef MYSQL_OPT_RECONNECT case MYSQL_OPT_RECONNECT: #endif /* MySQL 5.0.13 */ @@ -1872,6 +1870,9 @@ PHP_FUNCTION(mysqli_prepare) memcpy(sqlstate, mysql->mysql->net.sqlstate, SQLSTATE_LENGTH+1); #else MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info; + mysql->mysql->data->error_info->error_list.head = NULL; + mysql->mysql->data->error_info->error_list.tail = NULL; + mysql->mysql->data->error_info->error_list.count = 0; #endif mysqli_stmt_close(stmt->stmt, FALSE); stmt->stmt = NULL; @@ -1882,6 +1883,7 @@ PHP_FUNCTION(mysqli_prepare) memcpy(mysql->mysql->net.last_error, last_error, MYSQL_ERRMSG_SIZE); memcpy(mysql->mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH+1); #else + zend_llist_clean(&mysql->mysql->data->error_info->error_list); *mysql->mysql->data->error_info = error_info; #endif } @@ -2295,7 +2297,7 @@ PHP_FUNCTION(mysqli_stat) /* }}} */ -/* {{{ proto bool mysqli_refresh(object link, long options) +/* {{{ proto bool mysqli_refresh(object link, int options) Flush tables or caches, or reset replication server information */ PHP_FUNCTION(mysqli_refresh) { @@ -2315,7 +2317,7 @@ PHP_FUNCTION(mysqli_refresh) } /* }}} */ -/* {{{ proto int mysqli_stmt_attr_set(object stmt, long attr, long mode) +/* {{{ proto int mysqli_stmt_attr_set(object stmt, int attr, int mode) */ PHP_FUNCTION(mysqli_stmt_attr_set) { @@ -2362,7 +2364,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) } /* }}} */ -/* {{{ proto int mysqli_stmt_attr_get(object stmt, long attr) +/* {{{ proto int mysqli_stmt_attr_get(object stmt, int attr) */ PHP_FUNCTION(mysqli_stmt_attr_get) { @@ -2665,7 +2667,7 @@ PHP_FUNCTION(mysqli_use_result) } /* }}} */ -/* {{{ proto int mysqli_warning_count (object link) +/* {{{ proto int mysqli_warning_count(object link) Return number of warnings from the last query for the given link */ PHP_FUNCTION(mysqli_warning_count) { diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index f349501f7b..bc5f3ecc6f 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h index e56780a4c1..dab9b18861 100644 --- a/ext/mysqli/mysqli_fe.h +++ b/ext/mysqli/mysqli_fe.h @@ -15,8 +15,6 @@ | Author: Georg Richter <georg@php.net> | Andrey Hristov <andrey@php.net> | +----------------------------------------------------------------------+ - - $Id: php_mysqli_structs.h 302179 2010-08-13 09:57:04Z andrey $ */ #ifndef MYSQLI_FE_H diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index cbc932298b..7b6c07d2e3 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifdef HAVE_CONFIG_H @@ -35,11 +33,6 @@ #define SAFE_STR(a) ((a)?a:"") -#ifndef zend_parse_parameters_none -#define zend_parse_parameters_none() \ - zend_parse_parameters(ZEND_NUM_ARGS(), "") -#endif - /* {{{ php_mysqli_set_error */ static void php_mysqli_set_error(zend_long mysql_errno, char *mysql_err) @@ -185,7 +178,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne MyG(num_active_persistent)++; /* clear error */ - php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); + php_mysqli_set_error(mysql_errno(mysql->mysql), (char *) mysql_error(mysql->mysql)); goto end; } else { @@ -196,12 +189,10 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne } while (0); } } else { - zend_resource le; - le.type = php_le_pmysqli(); - le.ptr = plist = calloc(1, sizeof(mysqli_plist_entry)); + plist = calloc(1, sizeof(mysqli_plist_entry)); zend_ptr_stack_init_ex(&plist->free_links, 1); - zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(hash_key), ZSTR_LEN(hash_key), &le, sizeof(le)); + zend_register_persistent_resource(ZSTR_VAL(hash_key), ZSTR_LEN(hash_key), plist, php_le_pmysqli()); } } } @@ -297,7 +288,7 @@ end: err: if (mysql->hash_key) { - zend_string_release(mysql->hash_key); + zend_string_release_ex(mysql->hash_key, 0); mysql->hash_key = NULL; mysql->persistent = FALSE; } @@ -343,7 +334,7 @@ PHP_FUNCTION(mysqli_connect_error) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_array (object result [,int resulttype]) +/* {{{ proto mixed mysqli_fetch_array(object result [,int resulttype]) Fetch a result row as an associative array, a numeric array, or both */ PHP_FUNCTION(mysqli_fetch_array) { @@ -351,7 +342,7 @@ PHP_FUNCTION(mysqli_fetch_array) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_assoc (object result) +/* {{{ proto mixed mysqli_fetch_assoc(object result) Fetch a result row as an associative array */ PHP_FUNCTION(mysqli_fetch_assoc) { @@ -359,7 +350,7 @@ PHP_FUNCTION(mysqli_fetch_assoc) } /* }}} */ -/* {{{ proto mixed mysqli_fetch_all (object result [,int resulttype]) +/* {{{ proto mixed mysqli_fetch_all(object result [,int resulttype]) Fetches all result rows as an associative array, a numeric array, or both */ #if defined(MYSQLI_USE_MYSQLND) PHP_FUNCTION(mysqli_fetch_all) @@ -412,7 +403,7 @@ PHP_FUNCTION(mysqli_get_connection_stats) #endif /* }}} */ -/* {{{ proto mixed mysqli_error_list (object connection) +/* {{{ proto mixed mysqli_error_list(object connection) Fetches all client errors */ PHP_FUNCTION(mysqli_error_list) { @@ -423,14 +414,14 @@ PHP_FUNCTION(mysqli_error_list) return; } MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); - array_init(return_value); #if defined(MYSQLI_USE_MYSQLND) - if (mysql->mysql->data->error_info->error_list) { + if (1) { MYSQLND_ERROR_LIST_ELEMENT * message; zend_llist_position pos; - for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(mysql->mysql->data->error_info->error_list, &pos); + array_init(return_value); + for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&mysql->mysql->data->error_info->error_list, &pos); message; - message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(mysql->mysql->data->error_info->error_list, &pos)) + message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&mysql->mysql->data->error_info->error_list, &pos)) { zval single_error; array_init(&single_error); @@ -439,15 +430,20 @@ PHP_FUNCTION(mysqli_error_list) add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, message->error); add_next_index_zval(return_value, &single_error); } + } else { + ZVAL_EMPTY_ARRAY(return_value); } #else if (mysql_errno(mysql->mysql)) { zval single_error; + array_init(return_value); array_init(&single_error); add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_errno(mysql->mysql)); add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_sqlstate(mysql->mysql)); add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_error(mysql->mysql)); add_next_index_zval(return_value, &single_error); + } else { + ZVAL_EMPTY_ARRAY(return_value); } #endif } @@ -464,14 +460,14 @@ PHP_FUNCTION(mysqli_stmt_error_list) return; } MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_INITIALIZED); - array_init(return_value); #if defined(MYSQLI_USE_MYSQLND) - if (stmt->stmt && stmt->stmt->data && stmt->stmt->data->error_info->error_list) { + if (stmt->stmt && stmt->stmt->data && stmt->stmt->data->error_info) { MYSQLND_ERROR_LIST_ELEMENT * message; zend_llist_position pos; - for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(stmt->stmt->data->error_info->error_list, &pos); + array_init(return_value); + for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&stmt->stmt->data->error_info->error_list, &pos); message; - message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(stmt->stmt->data->error_info->error_list, &pos)) + message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&stmt->stmt->data->error_info->error_list, &pos)) { zval single_error; array_init(&single_error); @@ -480,21 +476,26 @@ PHP_FUNCTION(mysqli_stmt_error_list) add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, message->error); add_next_index_zval(return_value, &single_error); } + } else { + ZVAL_EMPTY_ARRAY(return_value); } #else if (mysql_stmt_errno(stmt->stmt)) { zval single_error; + array_init(return_value); array_init(&single_error); add_assoc_long_ex(&single_error, "errno", sizeof("errno") - 1, mysql_stmt_errno(stmt->stmt)); add_assoc_string_ex(&single_error, "sqlstate", sizeof("sqlstate") - 1, mysql_stmt_sqlstate(stmt->stmt)); add_assoc_string_ex(&single_error, "error", sizeof("error") - 1, mysql_stmt_error(stmt->stmt)); add_next_index_zval(return_value, &single_error); + } else { + ZVAL_EMPTY_ARRAY(return_value); } #endif } /* }}} */ -/* {{{ proto mixed mysqli_fetch_object (object result [, string class_name [, NULL|array ctor_params]]) +/* {{{ proto mixed mysqli_fetch_object(object result [, string class_name [, NULL|array ctor_params]]) Fetch a result row as an object */ PHP_FUNCTION(mysqli_fetch_object) { @@ -528,6 +529,9 @@ PHP_FUNCTION(mysqli_multi_query) s_errno = mysql_errno(mysql->mysql); #else MYSQLND_ERROR_INFO error_info = *mysql->mysql->data->error_info; + mysql->mysql->data->error_info->error_list.head = NULL; + mysql->mysql->data->error_info->error_list.tail = NULL; + mysql->mysql->data->error_info->error_list.count = 0; #endif MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); MYSQLI_DISABLE_MQ; @@ -538,6 +542,7 @@ PHP_FUNCTION(mysqli_multi_query) strcpy(mysql->mysql->net.sqlstate, s_sqlstate); mysql->mysql->net.last_errno = s_errno; #else + zend_llist_clean(&mysql->mysql->data->error_info->error_list); *mysql->mysql->data->error_info = error_info; #endif RETURN_FALSE; @@ -750,7 +755,7 @@ static int mysqlnd_dont_poll_zval_array_from_mysqlnd_array(MYSQLND **in_array, z } /* }}} */ -/* {{{ proto int mysqli_poll(array read, array write, array error, long sec [, long usec]) U +/* {{{ proto int mysqli_poll(array read, array write, array error, int sec [, int usec]) U Poll connections */ PHP_FUNCTION(mysqli_poll) { diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h index 04597c3ad4..de3f5f058d 100644 --- a/ext/mysqli/mysqli_priv.h +++ b/ext/mysqli/mysqli_priv.h @@ -14,8 +14,6 @@ +----------------------------------------------------------------------+ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - - $Id: php_mysqli_structs.h 302179 2010-08-13 09:57:04Z andrey $ */ #ifndef MYSQLI_PRIV_H @@ -33,7 +31,7 @@ #define HAVE_MYSQLI_GET_CHARSET #endif -#if defined(MYSQLND_VERSION_ID) || (MYSQL_VERSION_ID > 40112 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID > 50005 +#if defined(MYSQLND_VERSION_ID) || MYSQL_VERSION_ID > 50005 #define HAVE_MYSQLI_SET_CHARSET #endif diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index f553bdc68f..160ec551e0 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -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);\ @@ -184,15 +184,15 @@ static zval *link_error_list_read(mysqli_object *obj, zval *retval) mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; - array_init(retval); if (mysql) { + array_init(retval); #if defined(MYSQLI_USE_MYSQLND) - if (mysql->mysql->data->error_info->error_list) { + if (1) { MYSQLND_ERROR_LIST_ELEMENT * message; zend_llist_position pos; - for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(mysql->mysql->data->error_info->error_list, &pos); + for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&mysql->mysql->data->error_info->error_list, &pos); message; - message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(mysql->mysql->data->error_info->error_list, &pos)) + message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&mysql->mysql->data->error_info->error_list, &pos)) { zval single_error; array_init(&single_error); @@ -212,6 +212,8 @@ static zval *link_error_list_read(mysqli_object *obj, zval *retval) add_next_index_zval(retval, &single_error); } #endif + } else { + ZVAL_EMPTY_ARRAY(retval); } return retval; @@ -374,15 +376,15 @@ static zval *stmt_error_list_read(mysqli_object *obj, zval *retval) CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); stmt = (MY_STMT *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; - array_init(retval); if (stmt && stmt->stmt) { + array_init(retval); #if defined(MYSQLI_USE_MYSQLND) - if (stmt->stmt->data && stmt->stmt->data->error_info->error_list) { + if (stmt->stmt->data && stmt->stmt->data->error_info) { MYSQLND_ERROR_LIST_ELEMENT * message; zend_llist_position pos; - for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(stmt->stmt->data->error_info->error_list, &pos); + for (message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_first_ex(&stmt->stmt->data->error_info->error_list, &pos); message; - message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(stmt->stmt->data->error_info->error_list, &pos)) + message = (MYSQLND_ERROR_LIST_ELEMENT *) zend_llist_get_next_ex(&stmt->stmt->data->error_info->error_list, &pos)) { zval single_error; array_init(&single_error); @@ -402,6 +404,8 @@ static zval *stmt_error_list_read(mysqli_object *obj, zval *retval) add_next_index_zval(retval, &single_error); } #endif + } else { + ZVAL_EMPTY_ARRAY(retval); } return retval; } diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c index 2ac060b3bf..3b842aea4c 100644 --- a/ext/mysqli/mysqli_report.c +++ b/ext/mysqli/mysqli_report.c @@ -14,8 +14,6 @@ +----------------------------------------------------------------------+ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_result_iterator.c b/ext/mysqli/mysqli_result_iterator.c index 140018d106..9b42094345 100644 --- a/ext/mysqli/mysqli_result_iterator.c +++ b/ext/mysqli/mysqli_result_iterator.c @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id: mysqli.c 299335 2010-05-13 11:05:09Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -33,7 +31,7 @@ #include "zend_interfaces.h" -extern zend_object_iterator_funcs php_mysqli_result_iterator_funcs; +extern const zend_object_iterator_funcs php_mysqli_result_iterator_funcs; typedef struct { zend_object_iterator intern; @@ -68,7 +66,7 @@ static void php_mysqli_result_iterator_dtor(zend_object_iterator *iter) { php_mysqli_result_iterator *iterator = (php_mysqli_result_iterator*)iter; - /* cleanup handled in sxe_object_dtor as we dont always have an iterator wrapper */ + /* cleanup handled in sxe_object_dtor as we don't always have an iterator wrapper */ zval_ptr_dtor(&iterator->intern.data); zval_ptr_dtor(&iterator->current_row); } @@ -146,7 +144,7 @@ static void php_mysqli_result_iterator_current_key(zend_object_iterator *iter, z /* }}} */ /* {{{ php_mysqli_result_iterator_funcs */ -zend_object_iterator_funcs php_mysqli_result_iterator_funcs = { +const zend_object_iterator_funcs php_mysqli_result_iterator_funcs = { php_mysqli_result_iterator_dtor, php_mysqli_result_iterator_valid, php_mysqli_result_iterator_current_data, diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 72a90e781e..0170dec4bb 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -42,8 +42,8 @@ void php_clear_warnings(MYSQLI_WARNING *w) while (w) { n = w; - zval_dtor(&(w->reason)); - zval_dtor(&(w->sqlstate)); + zval_ptr_dtor_str(&(w->reason)); + zval_ptr_dtor_str(&(w->sqlstate)); w = w->next; efree(n); } @@ -144,8 +144,7 @@ MYSQLI_WARNING * php_get_warnings(MYSQLND_CONN_DATA * mysql) /* 1. Here comes the error no */ entry = zend_hash_get_current_data(Z_ARRVAL(row)); - convert_to_long_ex(entry); - errno = Z_LVAL_P(entry); + errno = zval_get_long(entry); zend_hash_move_forward(Z_ARRVAL(row)); /* 2. Here comes the reason */ @@ -257,10 +256,7 @@ PHP_METHOD(mysqli_warning, __construct) MYSQLI_WARNING *w; MYSQLI_RESOURCE *mysqli_resource; - if (ZEND_NUM_ARGS() != 1) { - WRONG_PARAM_COUNT; - } - if (zend_parse_parameters(1, "o", &z)==FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &z) == FAILURE) { return; } obj = Z_MYSQLI_P(z); diff --git a/ext/mysqli/package.xml b/ext/mysqli/package.xml deleted file mode 100644 index bfeeb71850..0000000000 --- a/ext/mysqli/package.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<!DOCTYPE package SYSTEM "../pear/package.dtd"> -<package> - <name>mysqli</name> - <summary>MySQLi - new MySQL interface for PHP 5 and MySQL 4.1+</summary> - <maintainers> - <maintainer> - <user>georg</user> - <name>Georg Richter</name> - <email>georg@php.net</email> - <role>lead</role> - </maintainer> - <maintainer> - <user>zak</user> - <name>Zak Greant</name> - <email>zak@php.net</email> - <role>lead</role> - </maintainer> - </maintainers> - <description> -MySQLi is a rewrite of the original MySQL extension ... - </description> - <license>PHP</license> - <release> - <state>beta</state> - <version>5.0.0rc1</version> - <date>2004-03-19</date> - <notes> -package.xml added to support installation using pear installer - </notes> - <configureoptions> - <configureoption name="with-mysqli" default="autodetect" prompt="path to mysql_config tool?"/> - <configureoption name="enable-embedded-mysqli" default="no" prompt="embedd mysql server into PHP?"/> - </configureoptions> - <filelist> - <file role="src" name="config.m4"/> - <file role="src" name="config.w32"/> - <file role="src" name="mysqli.c"/> - <file role="src" name="mysqli_api.c"/> - <file role="src" name="mysqli_fe.c"/> - <file role="src" name="mysqli_nonapi.c"/> - <file role="src" name="mysqli_prop.c"/> - <file role="src" name="mysqli_repl.c"/> - <file role="src" name="mysqli_report.c"/> - <file role="src" name="php_mysqli.h"/> - <file role="doc" name="CREDITS"/> - <file role="test" name="tests/001.phpt"/> - <file role="test" name="tests/002.phpt"/> - <file role="test" name="tests/003.phpt"/> - <file role="test" name="tests/004.phpt"/> - <file role="test" name="tests/005.phpt"/> - <file role="test" name="tests/006.phpt"/> - <file role="test" name="tests/007.phpt"/> - <file role="test" name="tests/008.phpt"/> - <file role="test" name="tests/009.phpt"/> - <file role="test" name="tests/010.phpt"/> - <file role="test" name="tests/011.phpt"/> - <file role="test" name="tests/012.phpt"/> - <file role="test" name="tests/013.phpt"/> - <file role="test" name="tests/014.phpt"/> - <file role="test" name="tests/015.phpt"/> - <file role="test" name="tests/016.phpt"/> - <file role="test" name="tests/017.phpt"/> - <file role="test" name="tests/018.phpt"/> - <file role="test" name="tests/019.phpt"/> - <file role="test" name="tests/020.phpt"/> - <file role="test" name="tests/021.phpt"/> - <file role="test" name="tests/022.phpt"/> - <file role="test" name="tests/023.phpt"/> - <file role="test" name="tests/024.phpt"/> - <file role="test" name="tests/025.phpt"/> - <file role="test" name="tests/026.phpt"/> - <file role="test" name="tests/027.phpt"/> - <file role="test" name="tests/028.phpt"/> - <file role="test" name="tests/029.phpt"/> - <file role="test" name="tests/030.phpt"/> - <file role="test" name="tests/031.phpt"/> - <file role="test" name="tests/032.phpt"/> - <file role="test" name="tests/033.phpt"/> - <file role="test" name="tests/034.phpt"/> - <file role="test" name="tests/035.phpt"/> - <file role="test" name="tests/036.phpt"/> - <file role="test" name="tests/037.phpt"/> - <file role="test" name="tests/038.phpt"/> - <file role="test" name="tests/039.phpt"/> - <file role="test" name="tests/040.phpt"/> - <file role="test" name="tests/041.phpt"/> - <file role="test" name="tests/042.phpt"/> - <file role="test" name="tests/043.phpt"/> - <file role="test" name="tests/044.phpt"/> - <file role="test" name="tests/045.phpt"/> - <file role="test" name="tests/046.phpt"/> - <file role="test" name="tests/047.phpt"/> - <file role="test" name="tests/048.phpt"/> - <file role="test" name="tests/049.phpt"/> - <file role="test" name="tests/050.phpt"/> - <file role="test" name="tests/051.phpt"/> - <file role="test" name="tests/052.phpt"/> - <file role="test" name="tests/053.phpt"/> - <file role="test" name="tests/054.phpt"/> - <file role="test" name="tests/055.phpt"/> - <file role="test" name="tests/056.phpt"/> - <file role="test" name="tests/057.phpt"/> - <file role="test" name="tests/058.phpt"/> - <file role="test" name="tests/059.phpt"/> - <file role="test" name="tests/060.phpt"/> - <file role="test" name="tests/connect.inc"/> - </filelist> - <deps> - <dep type="php" rel="ge" version="5" /> - </deps> - </release> -</package> -<!-- -vim:et:ts=1:sw=1 ---> diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index b83e4833de..abe66cbd46 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifndef PHP_MYSQLI_H diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 04f6896d3e..1b7ffddb1a 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -16,8 +16,6 @@ | Andrey Hristov <andrey@php.net> | | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - - $Id$ */ #ifndef PHP_MYSQLI_STRUCTS_H @@ -211,7 +209,7 @@ extern void php_mysqli_dtor_p_elements(void *data); extern void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status); -extern zend_object_iterator_funcs php_mysqli_result_iterator_funcs; +extern const zend_object_iterator_funcs php_mysqli_result_iterator_funcs; extern zend_object_iterator *php_mysqli_result_get_iterator(zend_class_entry *ce, zval *object, int by_ref); extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend_long fetchtype); @@ -256,12 +254,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;\ }\ } diff --git a/ext/mysqli/tests/002.phpt b/ext/mysqli/tests/002.phpt index aaece46faf..5a8dcae0c1 100644 --- a/ext/mysqli/tests/002.phpt +++ b/ext/mysqli/tests/002.phpt @@ -57,7 +57,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(11) { [0]=> int(1) diff --git a/ext/mysqli/tests/003.phpt b/ext/mysqli/tests/003.phpt index 63d5b43cfc..2e2089d4b2 100644 --- a/ext/mysqli/tests/003.phpt +++ b/ext/mysqli/tests/003.phpt @@ -83,7 +83,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(7) { [0]=> string(10) "2002-01-02" diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index 4896a786a8..ad58e7af27 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -61,7 +61,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(10) "1234567890" diff --git a/ext/mysqli/tests/005.phpt b/ext/mysqli/tests/005.phpt index e433351e01..cbb1cccf96 100644 --- a/ext/mysqli/tests/005.phpt +++ b/ext/mysqli/tests/005.phpt @@ -51,7 +51,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(10) "1234567890" diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt index e82ca65859..7807929348 100644 --- a/ext/mysqli/tests/009.phpt +++ b/ext/mysqli/tests/009.phpt @@ -92,7 +92,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch_uint")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(8) { [0]=> int(5) diff --git a/ext/mysqli/tests/011.phpt b/ext/mysqli/tests/011.phpt index 3b93b0a207..1792fec6a2 100644 --- a/ext/mysqli/tests/011.phpt +++ b/ext/mysqli/tests/011.phpt @@ -56,7 +56,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(8) { [0]=> int(19) diff --git a/ext/mysqli/tests/012.phpt b/ext/mysqli/tests/012.phpt index ebf8d76daf..2d8c6500ec 100644 --- a/ext/mysqli/tests/012.phpt +++ b/ext/mysqli/tests/012.phpt @@ -55,7 +55,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(8) { [0]=> int(120) diff --git a/ext/mysqli/tests/013.phpt b/ext/mysqli/tests/013.phpt index 6d75bde731..421899d10a 100644 --- a/ext/mysqli/tests/013.phpt +++ b/ext/mysqli/tests/013.phpt @@ -67,6 +67,6 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- ok done!
\ No newline at end of file diff --git a/ext/mysqli/tests/014.phpt b/ext/mysqli/tests/014.phpt index 59425ac9d0..576b337b57 100644 --- a/ext/mysqli/tests/014.phpt +++ b/ext/mysqli/tests/014.phpt @@ -80,7 +80,7 @@ mysqli autocommit/commit/rollback <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- Num_of_rows=1 array(2) { [0]=> diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt index 227a142d6a..de950b00f7 100644 --- a/ext/mysqli/tests/015.phpt +++ b/ext/mysqli/tests/015.phpt @@ -78,7 +78,7 @@ mysqli autocommit/commit/rollback with innodb <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(1) "1" diff --git a/ext/mysqli/tests/016.phpt b/ext/mysqli/tests/016.phpt index 143143c8f5..60170a727e 100644 --- a/ext/mysqli/tests/016.phpt +++ b/ext/mysqli/tests/016.phpt @@ -28,6 +28,6 @@ require_once('skipifconnectfailure.inc'); mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- string(6) "foobar" done!
\ No newline at end of file diff --git a/ext/mysqli/tests/019.phpt b/ext/mysqli/tests/019.phpt index 3c5530c03a..06f03c0cf1 100644 --- a/ext/mysqli/tests/019.phpt +++ b/ext/mysqli/tests/019.phpt @@ -66,7 +66,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS insert_read")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(11) { [0]=> int(1) diff --git a/ext/mysqli/tests/021.phpt b/ext/mysqli/tests/021.phpt index 6076529959..2011ae630d 100644 --- a/ext/mysqli/tests/021.phpt +++ b/ext/mysqli/tests/021.phpt @@ -49,7 +49,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(10) "1234567890" diff --git a/ext/mysqli/tests/026.phpt b/ext/mysqli/tests/026.phpt index 997dee6517..14b8dcbdba 100644 --- a/ext/mysqli/tests/026.phpt +++ b/ext/mysqli/tests/026.phpt @@ -55,7 +55,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(10) "Hello Worl" diff --git a/ext/mysqli/tests/032.phpt b/ext/mysqli/tests/032.phpt index d773defb26..d6427e7815 100644 --- a/ext/mysqli/tests/032.phpt +++ b/ext/mysqli/tests/032.phpt @@ -37,6 +37,6 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS general_test")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- string(38) "Records: 3 Duplicates: 0 Warnings: 0" done!
\ No newline at end of file diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt index c3a9901e4f..964e38330e 100644 --- a/ext/mysqli/tests/043.phpt +++ b/ext/mysqli/tests/043.phpt @@ -51,7 +51,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_update")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(1) { [0]=> string(15) "Rasmus is No. 1" diff --git a/ext/mysqli/tests/048.phpt b/ext/mysqli/tests/048.phpt index bd2625ad61..6f55d03716 100644 --- a/ext/mysqli/tests/048.phpt +++ b/ext/mysqli/tests/048.phpt @@ -51,7 +51,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(11) { [0]=> int(1) diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt index ed445f22de..00bb90724c 100644 --- a/ext/mysqli/tests/057.phpt +++ b/ext/mysqli/tests/057.phpt @@ -103,7 +103,7 @@ bool(true) bool(false) string(0) "" -Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, boolean given in %s on line %d +Warning: mysqli_stmt_reset() expects parameter 1 to be mysqli_stmt, bool given in %s on line %d NULL Rows: 3 array(1) { diff --git a/ext/mysqli/tests/058.phpt b/ext/mysqli/tests/058.phpt index 3d268749b9..0c75488dd6 100644 --- a/ext/mysqli/tests/058.phpt +++ b/ext/mysqli/tests/058.phpt @@ -59,7 +59,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS mbind")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(4) { [0]=> int(1) diff --git a/ext/mysqli/tests/059.phpt b/ext/mysqli/tests/059.phpt index d6e9d6ed55..a05acb825b 100644 --- a/ext/mysqli/tests/059.phpt +++ b/ext/mysqli/tests/059.phpt @@ -52,6 +52,6 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS mbind")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- string(6) "foobar" done!
\ No newline at end of file diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt index a6a0c4f205..8c5b6aa23c 100644 --- a/ext/mysqli/tests/061.phpt +++ b/ext/mysqli/tests/061.phpt @@ -70,7 +70,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS t_061")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- foo-bar string-string rab-oof diff --git a/ext/mysqli/tests/062.phpt b/ext/mysqli/tests/062.phpt index bfb7ea35bf..fa02853a19 100644 --- a/ext/mysqli/tests/062.phpt +++ b/ext/mysqli/tests/062.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); var_dump($row); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { [0]=> string(3) "foo" diff --git a/ext/mysqli/tests/063.phpt b/ext/mysqli/tests/063.phpt index da6708c0ac..c4852ac91d 100644 --- a/ext/mysqli/tests/063.phpt +++ b/ext/mysqli/tests/063.phpt @@ -20,5 +20,5 @@ require_once('skipifconnectfailure.inc'); var_dump($foo); ?> ---EXPECTF-- +--EXPECT-- string(3) "foo"
\ No newline at end of file diff --git a/ext/mysqli/tests/068.phpt b/ext/mysqli/tests/068.phpt index 78f710db8c..0d7899d177 100644 --- a/ext/mysqli/tests/068.phpt +++ b/ext/mysqli/tests/068.phpt @@ -7,5 +7,5 @@ mysqli get_client_info $s = mysqli_get_client_info(); echo gettype($s); ?> ---EXPECTF-- +--EXPECT-- string
\ No newline at end of file diff --git a/ext/mysqli/tests/069.phpt b/ext/mysqli/tests/069.phpt index c83cbc3c16..c195173188 100644 --- a/ext/mysqli/tests/069.phpt +++ b/ext/mysqli/tests/069.phpt @@ -26,7 +26,7 @@ require_once('skipifconnectfailure.inc'); $mysql->close(); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { [1]=> string(1) "1" diff --git a/ext/mysqli/tests/074.phpt b/ext/mysqli/tests/074.phpt index 7b4590f99c..b790f62839 100644 --- a/ext/mysqli/tests/074.phpt +++ b/ext/mysqli/tests/074.phpt @@ -21,7 +21,7 @@ require_once('skipifconnectfailure.inc'); var_dump($result->fetch_row()); ?> ---EXPECTF-- +--EXPECT-- bool(true) array(1) { [0]=> diff --git a/ext/mysqli/tests/bug28817.phpt b/ext/mysqli/tests/bug28817.phpt index 254c0e50de..5a5e924476 100644 --- a/ext/mysqli/tests/bug28817.phpt +++ b/ext/mysqli/tests/bug28817.phpt @@ -38,5 +38,5 @@ array(2) { [1]=> %s(3) "bar" } -NULL -bool(true)
\ No newline at end of file +bool(false) +bool(true) diff --git a/ext/mysqli/tests/bug29311.phpt b/ext/mysqli/tests/bug29311.phpt index cd7b9ef009..cfd5235e2b 100644 --- a/ext/mysqli/tests/bug29311.phpt +++ b/ext/mysqli/tests/bug29311.phpt @@ -47,5 +47,5 @@ require_once('skipifconnectfailure.inc'); } print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/bug30967.phpt b/ext/mysqli/tests/bug30967.phpt index 48007cee6c..9af81ea12a 100644 --- a/ext/mysqli/tests/bug30967.phpt +++ b/ext/mysqli/tests/bug30967.phpt @@ -22,5 +22,5 @@ require_once('skipifconnectfailure.inc'); $mysql->close(); ?> ---EXPECTF-- +--EXPECT-- 1064 diff --git a/ext/mysqli/tests/bug33263.phpt b/ext/mysqli/tests/bug33263.phpt index ac2de197bb..33c5dbbc56 100644 --- a/ext/mysqli/tests/bug33263.phpt +++ b/ext/mysqli/tests/bug33263.phpt @@ -33,5 +33,5 @@ require_once('skipifconnectfailure.inc'); $mysql->close(); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug33491.phpt b/ext/mysqli/tests/bug33491.phpt index 6500241760..aa2fb62def 100644 --- a/ext/mysqli/tests/bug33491.phpt +++ b/ext/mysqli/tests/bug33491.phpt @@ -26,7 +26,7 @@ $DB->query_single('SELECT DATE()'); ?> --EXPECTF-- -Fatal error: Uncaught Error: Call to a member function fetch_row() on boolean in %sbug33491.php:%d +Fatal error: Uncaught Error: Call to a member function fetch_row() on bool in %sbug33491.php:%d Stack trace: #0 %s(%d): DB->query_single('SELECT DATE()') #1 {main} diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index 43edfd7d50..7c36d806bc 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -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 diff --git a/ext/mysqli/tests/bug35517.phpt b/ext/mysqli/tests/bug35517.phpt index c40035d9c8..78b3206af4 100644 --- a/ext/mysqli/tests/bug35517.phpt +++ b/ext/mysqli/tests/bug35517.phpt @@ -45,7 +45,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS temp")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- 3000000897 3800001532 3900002281 diff --git a/ext/mysqli/tests/bug36802.phpt b/ext/mysqli/tests/bug36802.phpt index 3694a26db3..65e6d9a8ce 100644 --- a/ext/mysqli/tests/bug36802.phpt +++ b/ext/mysqli/tests/bug36802.phpt @@ -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/bug38710.phpt b/ext/mysqli/tests/bug38710.phpt index c3bb7285c8..b5baf19442 100644 --- a/ext/mysqli/tests/bug38710.phpt +++ b/ext/mysqli/tests/bug38710.phpt @@ -20,5 +20,5 @@ if ($text !== str_repeat('a', ($IS_MYSQLND || mysqli_get_server_version($db) > 5 } echo "Done"; ?> ---EXPECTF-- +--EXPECT-- Done
\ No newline at end of file diff --git a/ext/mysqli/tests/bug42378.phpt b/ext/mysqli/tests/bug42378.phpt index f3bbe346fa..1c75141306 100644 --- a/ext/mysqli/tests/bug42378.phpt +++ b/ext/mysqli/tests/bug42378.phpt @@ -184,7 +184,7 @@ memory_limit=83886080 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- FLOAT FORMAT(col1, 0) FLOAT diff --git a/ext/mysqli/tests/bug44897.phpt b/ext/mysqli/tests/bug44897.phpt index 84c245d0fc..89853a3acf 100644 --- a/ext/mysqli/tests/bug44897.phpt +++ b/ext/mysqli/tests/bug44897.phpt @@ -85,5 +85,5 @@ mysqli_query($link, "DROP PROCEDURE IF EXISTS p"); mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/bug45019.phpt b/ext/mysqli/tests/bug45019.phpt index b4c115d4cc..f7ace737d8 100644 --- a/ext/mysqli/tests/bug45019.phpt +++ b/ext/mysqli/tests/bug45019.phpt @@ -51,7 +51,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- Using CAST('somestring' AS CHAR)... string(3) "one" string(5) "three" diff --git a/ext/mysqli/tests/bug46109.phpt b/ext/mysqli/tests/bug46109.phpt index c377171b7b..a1c77ac2d8 100644 --- a/ext/mysqli/tests/bug46109.phpt +++ b/ext/mysqli/tests/bug46109.phpt @@ -14,5 +14,5 @@ require_once('skipifconnectfailure.inc'); $mysqli->init(); echo "done"; ?> ---EXPECTF-- +--EXPECT-- done diff --git a/ext/mysqli/tests/bug48909.phpt b/ext/mysqli/tests/bug48909.phpt index 76901390cb..94bf4236dc 100644 --- a/ext/mysqli/tests/bug48909.phpt +++ b/ext/mysqli/tests/bug48909.phpt @@ -42,5 +42,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done
\ No newline at end of file diff --git a/ext/mysqli/tests/bug49027.phpt b/ext/mysqli/tests/bug49027.phpt index 55b74ce017..059d986584 100644 --- a/ext/mysqli/tests/bug49027.phpt +++ b/ext/mysqli/tests/bug49027.phpt @@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- array(1) { [0]=> string(2) "42" diff --git a/ext/mysqli/tests/bug49442.phpt b/ext/mysqli/tests/bug49442.phpt index dce7b33cb7..f20cbb1b11 100644 --- a/ext/mysqli/tests/bug49442.phpt +++ b/ext/mysqli/tests/bug49442.phpt @@ -108,7 +108,7 @@ mysqli.max_persistent=1 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- array(2) { ["id"]=> string(2) "97" diff --git a/ext/mysqli/tests/bug50772.phpt b/ext/mysqli/tests/bug50772.phpt index eecef84ad2..6d0ee6c24c 100644 --- a/ext/mysqli/tests/bug50772.phpt +++ b/ext/mysqli/tests/bug50772.phpt @@ -30,7 +30,7 @@ require_once('skipifconnectfailure.inc'); } echo "done\n"; ?> ---EXPECTF-- +--EXPECT-- ok 1 ok 2 done
\ No newline at end of file diff --git a/ext/mysqli/tests/bug51605.phpt b/ext/mysqli/tests/bug51605.phpt index 02328a5be8..c57a7b36d3 100644 --- a/ext/mysqli/tests/bug51605.phpt +++ b/ext/mysqli/tests/bug51605.phpt @@ -37,7 +37,7 @@ mysqli.reconnect = Off print "done!"; ?> ---EXPECTF-- +--EXPECT-- closed once closed twice closed for third time diff --git a/ext/mysqli/tests/bug52082.phpt b/ext/mysqli/tests/bug52082.phpt index 8e3bd59ba5..815f79013a 100644 --- a/ext/mysqli/tests/bug52082.phpt +++ b/ext/mysqli/tests/bug52082.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(20) "character_set_client" diff --git a/ext/mysqli/tests/bug52891.phpt b/ext/mysqli/tests/bug52891.phpt index 463efd6d4e..7e4758887f 100644 --- a/ext/mysqli/tests/bug52891.phpt +++ b/ext/mysqli/tests/bug52891.phpt @@ -114,7 +114,7 @@ if (!mysqli_query($link, 'DROP TABLE IF EXISTS tsint')) { mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- tsint: array(1) { ["a"]=> diff --git a/ext/mysqli/tests/bug54221.phpt b/ext/mysqli/tests/bug54221.phpt index 78c9a2c40e..b031909aa2 100644 --- a/ext/mysqli/tests/bug54221.phpt +++ b/ext/mysqli/tests/bug54221.phpt @@ -41,7 +41,7 @@ mysqli.reconnect = Off print "done!"; ?> ---EXPECTF-- +--EXPECT-- Warning: : Warning: 1050: Table 't54221' already exists done! diff --git a/ext/mysqli/tests/bug54674.phpt b/ext/mysqli/tests/bug54674.phpt index efc67308b6..e18eed7f99 100644 --- a/ext/mysqli/tests/bug54674.phpt +++ b/ext/mysqli/tests/bug54674.phpt @@ -26,6 +26,6 @@ mysqli.reconnect = Off print "done!"; ?> ---EXPECTF-- +--EXPECT-- bool(true) done! diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt index a10c604fdd..6ea62065b9 100644 --- a/ext/mysqli/tests/bug55283.phpt +++ b/ext/mysqli/tests/bug55283.phpt @@ -59,7 +59,7 @@ $link->close(); echo "done\n"; ?> ---EXPECTF-- +--EXPECT-- array(2) { [0]=> string(10) "Ssl_cipher" diff --git a/ext/mysqli/tests/bug66043.phpt b/ext/mysqli/tests/bug66043.phpt index 52e42b6177..54ddf6943c 100644 --- a/ext/mysqli/tests/bug66043.phpt +++ b/ext/mysqli/tests/bug66043.phpt @@ -22,5 +22,5 @@ $stmt->execute(); $stmt->bind_result($testArg); echo "Okey"; ?> ---EXPECTF-- +--EXPECT-- Okey diff --git a/ext/mysqli/tests/bug66124.phpt b/ext/mysqli/tests/bug66124.phpt index 8c0027f9e6..9cb5f45726 100644 --- a/ext/mysqli/tests/bug66124.phpt +++ b/ext/mysqli/tests/bug66124.phpt @@ -91,7 +91,7 @@ if ($result){ $link->close(); ?> done ---EXPECTF-- +--EXPECT-- Using 'i': insert id:1311200011005001566=>1311200011005001566 fetch id:1311200011005001566 diff --git a/ext/mysqli/tests/bug67839.phpt b/ext/mysqli/tests/bug67839.phpt index 58b2d2fa82..f36c2bf6e7 100644 --- a/ext/mysqli/tests/bug67839.phpt +++ b/ext/mysqli/tests/bug67839.phpt @@ -64,5 +64,5 @@ precision=5 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- 1: 9.9999: 9.9999 diff --git a/ext/mysqli/tests/bug68077.phpt b/ext/mysqli/tests/bug68077.phpt index 0652e68c9b..f9fb962e77 100644 --- a/ext/mysqli/tests/bug68077.phpt +++ b/ext/mysqli/tests/bug68077.phpt @@ -74,7 +74,7 @@ $link->close(); unlink('bug53503.data'); ?> ---EXPECTF-- +--EXPECT-- done [006] [2000] open_basedir restriction in effect. Unable to open file done diff --git a/ext/mysqli/tests/bug70384.phpt b/ext/mysqli/tests/bug70384.phpt index aa8662badf..6987789d36 100644 --- a/ext/mysqli/tests/bug70384.phpt +++ b/ext/mysqli/tests/bug70384.phpt @@ -58,5 +58,5 @@ mysqli_float_handling - ensure 4 byte float is handled correctly <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- OK
\ No newline at end of file diff --git a/ext/mysqli/tests/bug72489.phpt b/ext/mysqli/tests/bug72489.phpt index 4e8fb3f4e5..744a504c8d 100644 --- a/ext/mysqli/tests/bug72489.phpt +++ b/ext/mysqli/tests/bug72489.phpt @@ -60,6 +60,6 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS bug72489")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- Finished 1 Finished 2 diff --git a/ext/mysqli/tests/bug73462.phpt b/ext/mysqli/tests/bug73462.phpt index 6de73761f4..5fb978feb1 100644 --- a/ext/mysqli/tests/bug73462.phpt +++ b/ext/mysqli/tests/bug73462.phpt @@ -37,5 +37,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/bug73949.phpt b/ext/mysqli/tests/bug73949.phpt index 7ce311eb77..9de75ecd2b 100644 --- a/ext/mysqli/tests/bug73949.phpt +++ b/ext/mysqli/tests/bug73949.phpt @@ -20,5 +20,5 @@ $t=array(new stdClass); while($db= mysqli_fetch_object($res,'cc',$t)){} print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/bug74547.phpt b/ext/mysqli/tests/bug74547.phpt index a771c9a852..940357ad04 100644 --- a/ext/mysqli/tests/bug74547.phpt +++ b/ext/mysqli/tests/bug74547.phpt @@ -20,6 +20,6 @@ Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/str mysqli_close($link); ?> ===DONE=== ---EXPECTF-- +--EXPECT-- bool(true) ===DONE=== diff --git a/ext/mysqli/tests/bug74737.phpt b/ext/mysqli/tests/bug74737.phpt index b45f843830..3651ac23cd 100644 --- a/ext/mysqli/tests/bug74737.phpt +++ b/ext/mysqli/tests/bug74737.phpt @@ -3,7 +3,6 @@ Bug #74737: Incorrect ReflectionFunction information for mysqli_get_client_info --SKIPIF-- <?php require_once('skipif.inc'); -if (!extension_loaded('reflection')) { die("skip"); } ?> --FILE-- <?php diff --git a/ext/mysqli/tests/bug75434.phpt b/ext/mysqli/tests/bug75434.phpt index 88050ec4a5..751ad4eb8f 100644 --- a/ext/mysqli/tests/bug75434.phpt +++ b/ext/mysqli/tests/bug75434.phpt @@ -3,7 +3,7 @@ Bug #75434 Wrong reflection for mysqli_fetch_all function --SKIPIF-- <?php require_once('skipif.inc'); -if (!extension_loaded("reflection")) die("skip reflection extension not available"); +if (!stristr(mysqli_get_client_info(), 'mysqlnd')) die("skip: only available in mysqlnd"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/bug75448.phpt b/ext/mysqli/tests/bug75448.phpt new file mode 100644 index 0000000000..d4b1b05f51 --- /dev/null +++ b/ext/mysqli/tests/bug75448.phpt @@ -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) diff --git a/ext/mysqli/tests/bug76386.phpt b/ext/mysqli/tests/bug76386.phpt new file mode 100644 index 0000000000..4182c651b7 --- /dev/null +++ b/ext/mysqli/tests/bug76386.phpt @@ -0,0 +1,104 @@ +--TEST-- +Prepared Statement formatter truncates fractional seconds from date/time column (bug #76386) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +require_once("connect.inc"); + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die("skip Cannot connect to check required version"); + +/* Fractional seconds are supported with servers >= 5.6.4. */ +if (mysqli_get_server_version($link) < 50604) { + die(sprintf("skip Server doesn't support fractional seconds in timestamp (%s)", mysqli_get_server_version($link))); +} +mysqli_close($link); +?> +--FILE-- +<?php +require_once('connect.inc'); +// test part 1 - TIMESTAMP(n) +$link = new mysqli($host, $user, $passwd, $db, $port, $socket); +$link->query('DROP TABLE IF EXISTS ts_test;'); +$link->query( + 'CREATE TABLE ts_test (id bigint unsigned auto_increment primary key, ' . + 'ts timestamp default current_timestamp(), ts2 timestamp(2) default ' . + 'current_timestamp(2), ts2b timestamp(2) default "2018-01-01 03:04:05.06", ' . + 'ts4 timestamp(4) default current_timestamp(4), ts4b timestamp(4) default ' . + '"2018-01-01 03:04:05.0070", ts6 timestamp(6) default current_timestamp(6), ts6b ' . + 'timestamp(6) default "2018-01-01 03:04:05.008000") character set utf8 collate ' . + 'utf8_general_ci;' +); +$link->query( + 'INSERT INTO ts_test (ts, ts2, ts4, ts6) VALUES ("2018-01-01 11:22:33", ' . + '"2018-02-02 11:22:33.77", "2018-03-03 11:22:33.8888", ' . + '"2018-04-04 11:22:33.999999");' +); +$stmt = $link->prepare('SELECT * FROM ts_test;'); // must be statement +if ($stmt) { + $stmt->execute(); + $tsid = $ts = $ts2 = $ts2b = $ts4 = $ts4b = $ts6 = $ts6b = null; + $stmt->bind_result($tsid, $ts, $ts2, $ts2b, $ts4, $ts4b, $ts6, $ts6b); + $stmt->fetch(); + var_dump($ts, $ts2, $ts2b, $ts4, $ts4b, $ts6, $ts6b); + $stmt->free_result(); +} else { + echo('[FIRST][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL); +} +$link->close(); + +// test part 2 - TIME(n) +$link = new mysqli($host, $user, $passwd, $db, $port, $socket); +$link->query('DROP TABLE IF EXISTS t_test;'); +$link->query( + 'CREATE TABLE t_test (id bigint unsigned auto_increment primary key, ' . + 't time default "11:00:00", t2 time(2) default "11:00:00.22", t4 ' . + 'time(4) default "11:00:00.4444", t6 time(6) default "11:00:00.006054") ' . + 'character set utf8 collate utf8_general_ci;' +); +$link->query( + 'INSERT INTO t_test (t, t2, t4, t6) VALUES ("21:22:33", "21:22:33.44", ' . + '"21:22:33.5555", "21:22:33.676767");' +); +$link->query('INSERT INTO t_test VALUES ();'); + +$stmt = $link->prepare('SELECT * FROM t_test;'); +if ($stmt) { + $stmt->execute(); + $tid = $t = $t2 = $t3 = $t4 = null; + $stmt->bind_result($tid, $t, $t2, $t4, $t6); + while ($stmt->fetch()) { + var_dump($t, $t2, $t4, $t6); + } + $stmt->free_result(); +} else { + echo('[SECOND][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL); +} +$link->close(); +?> +--EXPECTF-- +string(19) "2018-01-01 11:22:33" +string(22) "2018-02-02 11:22:33.77" +string(22) "2018-01-01 03:04:05.06" +string(24) "2018-03-03 11:22:33.8888" +string(24) "2018-01-01 03:04:05.0070" +string(26) "2018-04-04 11:22:33.999999" +string(26) "2018-01-01 03:04:05.008000" +string(8) "21:22:33" +string(11) "21:22:33.44" +string(13) "21:22:33.5555" +string(15) "21:22:33.676767" +string(8) "11:00:00" +string(11) "11:00:00.22" +string(13) "11:00:00.4444" +string(15) "11:00:00.006054" +--CLEAN-- +<?php +require_once('connect.inc'); +$link = new mysqli($host, $user, $passwd, $db, $port, $socket); +$link->query('DROP TABLE ts_test;'); +$link->query('DROP TABLE t_test;'); +$link->close(); +?> diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt index 958b83cb3c..95c3bb3426 100644 --- a/ext/mysqli/tests/mysqli_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows.phpt @@ -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!"; ?> @@ -131,5 +131,5 @@ mysqli_affected_rows() <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt index 6da026bc5a..7a6a5be996 100644 --- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt @@ -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!"; ?> @@ -110,5 +110,5 @@ mysqli->affected_rows <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt index a93d89f101..cc41786bdb 100644 --- a/ext/mysqli/tests/mysqli_autocommit.phpt +++ b/ext/mysqli/tests/mysqli_autocommit.phpt @@ -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!"; ?> @@ -143,5 +143,5 @@ mysqli_autocommit() <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index 3a5a25779d..7c616aab50 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -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!"; ?> @@ -133,5 +133,5 @@ mysqli->autocommit() <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt index 09009a1368..7b9f23cf9e 100644 --- a/ext/mysqli/tests/mysqli_change_user.phpt +++ b/ext/mysqli/tests/mysqli_change_user.phpt @@ -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", @@ -144,5 +144,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt index 7d1c398142..00fa9f0af6 100644 --- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt @@ -61,5 +61,5 @@ if (!$IS_MYSQLND) { <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt index e40154ce10..fa8c66f56b 100644 --- a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt +++ b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt @@ -103,5 +103,5 @@ die("skip - is the server still buggy?"); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_old.phpt b/ext/mysqli/tests/mysqli_change_user_old.phpt index 96357ebf51..cf53016f59 100644 --- a/ext/mysqli/tests/mysqli_change_user_old.phpt +++ b/ext/mysqli/tests/mysqli_change_user_old.phpt @@ -123,5 +123,5 @@ if (mysqli_get_server_version($link) >= 50600) print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_oo.phpt b/ext/mysqli/tests/mysqli_change_user_oo.phpt index 34a3e51bb1..5203381088 100644 --- a/ext/mysqli/tests/mysqli_change_user_oo.phpt +++ b/ext/mysqli/tests/mysqli_change_user_oo.phpt @@ -88,5 +88,5 @@ if (mysqli_get_server_version($link) >= 50600) print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_prepared_statements.phpt b/ext/mysqli/tests/mysqli_change_user_prepared_statements.phpt index 6a37b6b44a..577673f0b5 100644 --- a/ext/mysqli/tests/mysqli_change_user_prepared_statements.phpt +++ b/ext/mysqli/tests/mysqli_change_user_prepared_statements.phpt @@ -29,5 +29,5 @@ require_once('skipifconnectfailure.inc'); mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_change_user_rollback.phpt b/ext/mysqli/tests/mysqli_change_user_rollback.phpt index ed3330e064..12370b18cc 100644 --- a/ext/mysqli/tests/mysqli_change_user_rollback.phpt +++ b/ext/mysqli/tests/mysqli_change_user_rollback.phpt @@ -66,5 +66,5 @@ if (!have_innodb($link)) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_change_user_set_names.phpt b/ext/mysqli/tests/mysqli_change_user_set_names.phpt index 0adaf52b85..614aa7a023 100644 --- a/ext/mysqli/tests/mysqli_change_user_set_names.phpt +++ b/ext/mysqli/tests/mysqli_change_user_set_names.phpt @@ -153,5 +153,5 @@ if ($version[0] <= 4 && $version[1] < 1) mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_character_set.phpt b/ext/mysqli/tests/mysqli_character_set.phpt index 82be2c4683..855141e40d 100644 --- a/ext/mysqli/tests/mysqli_character_set.phpt +++ b/ext/mysqli/tests/mysqli_character_set.phpt @@ -103,5 +103,5 @@ if (!function_exists('mysqli_set_charset')) { <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt index 722facab00..90dd46fa73 100644 --- a/ext/mysqli/tests/mysqli_character_set_name.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name.phpt @@ -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())) @@ -71,5 +71,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt index 7b71940e59..5d303fd503 100644 --- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt @@ -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 +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt index 2e6d9c2fd1..11c3492817 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_driver_reflection.phpt @@ -5,8 +5,6 @@ Interface of the class mysqli_driver - Reflection require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('connect.inc'); -if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5)) - die("skip Reflection not available before PHP 5 (found PHP $tmp)"); /* Let's not deal with cross-version issues in the EXPECTF/UEXPECTF. diff --git a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt index 7e36c6571e..fe6808e8c0 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt index db1d3444c7..9247721e43 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt @@ -24,7 +24,7 @@ if ($MYSQLND_VERSION < 50004) inspectClass($class); print "done!\n"; ?> ---EXPECTF-- +--EXPECT-- Inspecting class 'mysqli' isInternal: yes isUserDefined: no diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt index 544a6a3f22..68dd834116 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt @@ -187,7 +187,7 @@ mysqli_result->unknown = '' Constructor: -Warning: mysqli_result::__construct() expects parameter 2 to be integer, string given in %s on line %d +Warning: mysqli_result::__construct() expects parameter 2 to be int, string given in %s on line %d Warning: mysqli_result::__construct() expects parameter 1 to be mysqli, string given in %s on line %d done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt index 89be46fb8a..ee2765c4dc 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt @@ -7,9 +7,6 @@ require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); -if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5)) - die("skip Reflection not available before PHP 5 (found PHP $tmp)"); - /* Let's not deal with cross-version issues in the EXPECTF/UEXPECTF. Most of the things which we test are covered by mysqli_class_*_interface.phpt. @@ -27,7 +24,7 @@ if ($MYSQLND_VERSION < 50004) inspectClass($class); print "done!"; ?> ---EXPECTF-- +--EXPECT-- Inspecting class 'mysqli_result' isInternal: yes isUserDefined: no diff --git a/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt index dc0c14e6e8..8ad12737a7 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_warning_reflection.phpt @@ -6,9 +6,6 @@ require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('connect.inc'); -if (($tmp = substr(PHP_VERSION, 0, strpos(PHP_VERSION, '.'))) && ($tmp < 5)) - die("skip Reflection not available before PHP 5 (found PHP $tmp)"); - /* Let's not deal with cross-version issues in the EXPECTF/UEXPECTF. Most of the things which we test are covered by mysqli_class_*_interface.phpt. diff --git a/ext/mysqli/tests/mysqli_close.phpt b/ext/mysqli/tests/mysqli_close.phpt index c6ac92dd60..a300fb8314 100644 --- a/ext/mysqli/tests/mysqli_close.phpt +++ b/ext/mysqli/tests/mysqli_close.phpt @@ -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 +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt index be67f779a8..305d5edf88 100644 --- a/ext/mysqli/tests/mysqli_close_oo.phpt +++ b/ext/mysqli/tests/mysqli_close_oo.phpt @@ -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 +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt index d20ba5dd23..27ae3a928a 100644 --- a/ext/mysqli/tests/mysqli_commit.phpt +++ b/ext/mysqli/tests/mysqli_commit.phpt @@ -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!"; ?> @@ -73,5 +73,5 @@ if (!have_innodb($link)) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index 77bcf412e7..021f089064 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_connect_errno.phpt b/ext/mysqli/tests/mysqli_connect_errno.phpt index a7f90f1527..c2d22ee8ea 100644 --- a/ext/mysqli/tests/mysqli_connect_errno.phpt +++ b/ext/mysqli/tests/mysqli_connect_errno.phpt @@ -36,5 +36,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_connect_error.phpt b/ext/mysqli/tests/mysqli_connect_error.phpt index 79ac3f1f79..dca311ea93 100644 --- a/ext/mysqli/tests/mysqli_connect_error.phpt +++ b/ext/mysqli/tests/mysqli_connect_error.phpt @@ -35,5 +35,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_connect_oo.phpt b/ext/mysqli/tests/mysqli_connect_oo.phpt index 32dfac0eb2..15520d42b5 100644 --- a/ext/mysqli/tests/mysqli_connect_oo.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt index 7f049b052f..d60ff3876a 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt @@ -156,7 +156,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["testing"]=> string(19) "mysqli.default_port" diff --git a/ext/mysqli/tests/mysqli_connect_twice.phpt b/ext/mysqli/tests/mysqli_connect_twice.phpt index 2809a3feda..97ca40c61c 100644 --- a/ext/mysqli/tests/mysqli_connect_twice.phpt +++ b/ext/mysqli/tests/mysqli_connect_twice.phpt @@ -72,7 +72,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["it_works"]=> string(2) "ok" diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt index 42113aef2b..6f1cd5faa7 100644 --- a/ext/mysqli/tests/mysqli_constants.phpt +++ b/ext/mysqli/tests/mysqli_constants.phpt @@ -237,5 +237,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_constants_categories.phpt b/ext/mysqli/tests/mysqli_constants_categories.phpt index e51325a213..28aaa582ad 100644 --- a/ext/mysqli/tests/mysqli_constants_categories.phpt +++ b/ext/mysqli/tests/mysqli_constants_categories.phpt @@ -20,5 +20,5 @@ require_once('skipifemb.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_data_seek.phpt b/ext/mysqli/tests/mysqli_data_seek.phpt index 9e2d65047b..9bc3b12f73 100644 --- a/ext/mysqli/tests/mysqli_data_seek.phpt +++ b/ext/mysqli/tests/mysqli_data_seek.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt index 0858218a46..7fb14f0956 100644 --- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt +++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_debug_ini.phpt b/ext/mysqli/tests/mysqli_debug_ini.phpt index bcf00672d6..d644bf9204 100644 --- a/ext/mysqli/tests/mysqli_debug_ini.phpt +++ b/ext/mysqli/tests/mysqli_debug_ini.phpt @@ -48,6 +48,6 @@ mysqlnd.debug="t:O,/tmp/mysqli_debug_phpt.trace" print "done!"; ?> ---EXPECTF-- +--EXPECT-- string(32) "t:O,/tmp/mysqli_debug_phpt.trace" done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt index b5ba9a5a05..9999d84395 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt @@ -207,8 +207,8 @@ if (!$IS_MYSQLND) // mysqlnd only option // m - trace memory allocations $trace = try_control_string($link, 't:O,' . $trace_file . ':m', $trace_file, 120); - if (!preg_match("@^[|\s]*>\_mysqlnd_pefree@ismU", $trace, $matches) && - !preg_match("@^[|\s]*>\_mysqlnd_pemalloc@ismU", $trace, $matches)) { + if (!preg_match("@^[|\s]*>\_mysqlnd_p?efree@ismU", $trace, $matches) && + !preg_match("@^[|\s]*>\_mysqlnd_p?emalloc@ismU", $trace, $matches)) { printf("[125] Memory dump does neither contain _mysqlnd_pefree nor _mysqlnd_pemalloc calls - check manually.\n"); var_dump($trace); } diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt index 2886694440..333aaa10c0 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt @@ -90,9 +90,11 @@ if (!$IS_MYSQLND) if (isset($functions_trace[$name])) $found++; - if ($found < (count($memory_funcs) - 3)) + if ($found < 1) { printf("[016] Only %d memory functions have been found, expecting at least %d.\n", - $found, count($memory_funcs) - 3); + $found, 1); + var_dump($trace); + } $trace = try_control_string($link, 't:O,' . $trace_file, $trace_file, 20); if (!strstr($trace, 'SELECT * FROM test') && !strstr($trace, 'mysql_real_query')) @@ -112,9 +114,11 @@ if (!$IS_MYSQLND) if (isset($functions_trace[$name])) $found++; - if ($found > 2) + if ($found > 2) { printf("[026] More than %d memory functions have been recorded, that's strange.\n", $found); + var_dump($trace); + } mysqli_close($link); @unlink($trace_file); @@ -124,5 +128,5 @@ if (!$IS_MYSQLND) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_dump_debug_info.phpt b/ext/mysqli/tests/mysqli_dump_debug_info.phpt index bd87ddf0c8..b3fbde7fd9 100644 --- a/ext/mysqli/tests/mysqli_dump_debug_info.phpt +++ b/ext/mysqli/tests/mysqli_dump_debug_info.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt index 82edef5619..a0b5365432 100644 --- a/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt +++ b/ext/mysqli/tests/mysqli_dump_debug_info_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_errno.phpt b/ext/mysqli/tests/mysqli_errno.phpt index 0e9f0496af..0a9c245341 100644 --- a/ext/mysqli/tests/mysqli_errno.phpt +++ b/ext/mysqli/tests/mysqli_errno.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_errno_oo.phpt b/ext/mysqli/tests/mysqli_errno_oo.phpt index 5d5ea25089..f2fa2529a1 100644 --- a/ext/mysqli/tests/mysqli_errno_oo.phpt +++ b/ext/mysqli/tests/mysqli_errno_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_error.phpt b/ext/mysqli/tests/mysqli_error.phpt index 5e70d59d41..fd61f0f5d2 100644 --- a/ext/mysqli/tests/mysqli_error.phpt +++ b/ext/mysqli/tests/mysqli_error.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_error_oo.phpt b/ext/mysqli/tests/mysqli_error_oo.phpt index 1f0589679d..d05fd6f383 100644 --- a/ext/mysqli/tests/mysqli_error_oo.phpt +++ b/ext/mysqli/tests/mysqli_error_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_error_unicode.phpt b/ext/mysqli/tests/mysqli_error_unicode.phpt index e6bf1c9bc7..f4d8da9110 100644 --- a/ext/mysqli/tests/mysqli_error_unicode.phpt +++ b/ext/mysqli/tests/mysqli_error_unicode.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_explain_metadata.phpt b/ext/mysqli/tests/mysqli_explain_metadata.phpt index 8f4a7cc8c5..157559b340 100644 --- a/ext/mysqli/tests/mysqli_explain_metadata.phpt +++ b/ext/mysqli/tests/mysqli_explain_metadata.phpt @@ -159,5 +159,5 @@ if (!$IS_MYSQLND) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt index dce785af51..f9a7ee3770 100644 --- a/ext/mysqli/tests/mysqli_fetch_all.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index 450c67ecd9..9dac357ae1 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index e232898c7b..e9dd1602b5 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt index 2fb8281939..171a1a4010 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt @@ -31,7 +31,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- [002] array(2) { ["id"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt index 82e4d7b666..ccd94043a1 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt @@ -111,5 +111,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index 0fb1a72e93..b0e2234960 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt index 0d721fd5c6..6b98b5f51c 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt index d9bdcfad37..586bfb03b3 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt @@ -113,5 +113,5 @@ mysqli_fetch_assoc() - BIT <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt index 026252b504..e4f6465176 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt index ce7e82dc08..09ff9d193d 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt @@ -74,5 +74,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index f1d6db0599..684795a48e 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -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)); diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt index d17eb7506f..be883ef625 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 4ac84d580a..c240050e17 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt index e234a28fe5..f55a32b951 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt @@ -240,5 +240,5 @@ mysqli_close($link); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index 039d2b4e31..2293c9581a 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -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!"; diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt index d02c02c765..70464ffb51 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt @@ -122,5 +122,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index 854af23302..c79555c3a1 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -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!"; diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt index 6d0b698ee7..85921f800d 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt index 7523621a34..c352bea8a0 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt @@ -46,5 +46,5 @@ array(2) { NULL Warning: main(): Property access is not allowed yet in %s on line %d -NULL +bool(false) done! diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index dff91531ce..09ea19161a 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -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 diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 8fac044139..d8c8cc70fd 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -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 diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt index 59f6cbae3b..7ca1b9a132 100644 --- a/ext/mysqli/tests/mysqli_fetch_row.phpt +++ b/ext/mysqli/tests/mysqli_fetch_row.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt index 9a778c94cb..d6581c6699 100644 --- a/ext/mysqli/tests/mysqli_field_count.phpt +++ b/ext/mysqli/tests/mysqli_field_count.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index b30b11cd27..c34cf3f647 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -218,7 +218,7 @@ Warning: mysqli_field_seek(): Invalid field offset in %s on line %d bool(false) bool(false) -Warning: mysqli_field_seek() expects parameter 2 to be integer, float given in %s on line %d +Warning: mysqli_field_seek() expects parameter 2 to be int, float given in %s on line %d NULL bool(true) object(stdClass)#%d (13) { @@ -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! diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt index 0a89e45914..9885c1d9d8 100644 --- a/ext/mysqli/tests/mysqli_field_tell.phpt +++ b/ext/mysqli/tests/mysqli_field_tell.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_fork.phpt b/ext/mysqli/tests/mysqli_fork.phpt index f5a0b7bc95..4862b7a220 100644 --- a/ext/mysqli/tests/mysqli_fork.phpt +++ b/ext/mysqli/tests/mysqli_fork.phpt @@ -236,7 +236,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS messages")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(1) { ["message"]=> string(20) "dumped by the parent" diff --git a/ext/mysqli/tests/mysqli_free_result.phpt b/ext/mysqli/tests/mysqli_free_result.phpt index 28f338ac6d..6cd7778319 100644 --- a/ext/mysqli/tests/mysqli_free_result.phpt +++ b/ext/mysqli/tests/mysqli_free_result.phpt @@ -60,19 +60,19 @@ NULL b Warning: mysqli_free_result(): Couldn't fetch mysqli_result in %s on line %d -NULL +bool(false) c bool(false) %s(0) "" [005] -Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in %s on line %d +Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d NULL d bool(false) %s(0) "" [007] -Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in %s on line %d +Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d NULL done! diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt index 8f81b3342e..537809dd70 100644 --- a/ext/mysqli/tests/mysqli_get_charset.phpt +++ b/ext/mysqli/tests/mysqli_get_charset.phpt @@ -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!"; ?> diff --git a/ext/mysqli/tests/mysqli_get_client_info.phpt b/ext/mysqli/tests/mysqli_get_client_info.phpt index bb3f5cc1f1..ffb9e954cc 100644 --- a/ext/mysqli/tests/mysqli_get_client_info.phpt +++ b/ext/mysqli/tests/mysqli_get_client_info.phpt @@ -14,5 +14,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt index e2dff9befb..0b3d772d5c 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt @@ -44,5 +44,5 @@ mysqlnd.collect_memory_statistics=0 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_client_version.phpt b/ext/mysqli/tests/mysqli_get_client_version.phpt index 5862c0aaa1..9fb1040580 100644 --- a/ext/mysqli/tests/mysqli_get_client_version.phpt +++ b/ext/mysqli/tests/mysqli_get_client_version.phpt @@ -10,5 +10,5 @@ mysqli_get_client_version() print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt index 64eba16679..80875a44e6 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt @@ -83,5 +83,5 @@ if (!function_exists('mysqli_get_connection_stats')) { <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt index 4897063c12..549d9c8a72 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt @@ -49,5 +49,5 @@ if (!function_exists('mysqli_get_connection_stats')) { mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt index 2c3c0f806d..0dd7291342 100644 --- a/ext/mysqli/tests/mysqli_get_host_info.phpt +++ b/ext/mysqli/tests/mysqli_get_host_info.phpt @@ -31,5 +31,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt index 7fbefeb853..28313670ad 100644 --- a/ext/mysqli/tests/mysqli_get_proto_info.phpt +++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt @@ -25,5 +25,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_server_info.phpt b/ext/mysqli/tests/mysqli_get_server_info.phpt index a7f785302b..d1eb116cb0 100644 --- a/ext/mysqli/tests/mysqli_get_server_info.phpt +++ b/ext/mysqli/tests/mysqli_get_server_info.phpt @@ -29,5 +29,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt index b30c4a3801..30b95748b3 100644 --- a/ext/mysqli/tests/mysqli_get_server_version.phpt +++ b/ext/mysqli/tests/mysqli_get_server_version.phpt @@ -24,5 +24,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_get_warnings.phpt b/ext/mysqli/tests/mysqli_get_warnings.phpt index 2b70fda3ed..b0076c1859 100644 --- a/ext/mysqli/tests/mysqli_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_get_warnings.phpt @@ -154,5 +154,5 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS t1")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt index d60ffd9fbe..21851d6b30 100644 --- a/ext/mysqli/tests/mysqli_info.phpt +++ b/ext/mysqli/tests/mysqli_info.phpt @@ -94,5 +94,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_init.phpt b/ext/mysqli/tests/mysqli_init.phpt index 1abb7ca37e..c6774c311f 100644 --- a/ext/mysqli/tests/mysqli_init.phpt +++ b/ext/mysqli/tests/mysqli_init.phpt @@ -21,5 +21,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_insert_id.phpt b/ext/mysqli/tests/mysqli_insert_id.phpt index 549d71d156..7d4c0e085c 100644 --- a/ext/mysqli/tests/mysqli_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_insert_id.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_insert_id_variation.phpt b/ext/mysqli/tests/mysqli_insert_id_variation.phpt index e858ca0689..12c858fbe4 100644 --- a/ext/mysqli/tests/mysqli_insert_id_variation.phpt +++ b/ext/mysqli/tests/mysqli_insert_id_variation.phpt @@ -99,5 +99,5 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_insert_id_var")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- DONE
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt index c7f38fa0fc..2833f3fb18 100644 --- a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt +++ b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt @@ -112,5 +112,5 @@ memory_limit=256M <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_max_links.phpt b/ext/mysqli/tests/mysqli_max_links.phpt index 7f49419401..f3469e20e6 100644 --- a/ext/mysqli/tests/mysqli_max_links.phpt +++ b/ext/mysqli/tests/mysqli_max_links.phpt @@ -54,23 +54,23 @@ Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d Warning: mysqli_%sonnect(): Too many open links (1) in %s on line %d -Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_query() expects parameter 1 to be mysqli, bool given in %s on line %d -Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in %s on line %d +Warning: mysqli_close() expects parameter 1 to be mysqli, bool given in %s on line %d done! diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt index 271c63e1d1..4ce6a19c79 100644 --- a/ext/mysqli/tests/mysqli_more_results.phpt +++ b/ext/mysqli/tests/mysqli_more_results.phpt @@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc'); <?php require_once("connect.inc"); - $strict_on = false; - if (defined('E_STRICT')) { - error_reporting(((int)ini_get('error_reporting')) | E_STRICT ); - $strict_on = true; - } - $tmp = NULL; $link = NULL; @@ -35,9 +29,6 @@ require_once('skipifconnectfailure.inc'); print "[006]\n"; $i = 1; - if ($strict_on) - ob_start(); - if (mysqli_get_server_version($link) > 41000 && !($ret = mysqli_more_results($link))) printf("[007] Expecting boolean/true, got %s/%s\n", gettype($ret), $ret); do { @@ -47,17 +38,6 @@ require_once('skipifconnectfailure.inc'); printf("%d\n", $i++); } while (mysqli_next_result($link)); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[008] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } - if (!mysqli_multi_query($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM test ORDER BY id LIMIT 3")) printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); print "[010]\n"; @@ -65,8 +45,6 @@ require_once('skipifconnectfailure.inc'); if (mysqli_get_server_version($link) > 41000 && !($ret = mysqli_more_results($link))) printf("[011] Expecting boolean/true, got %s/%s\n", gettype($ret), $ret); - if ($strict_on) - ob_start(); do { $res = mysqli_use_result($link); // NOTE: if you use mysqli_use_result() with mysqli_more_results() or any other info function, @@ -79,16 +57,6 @@ require_once('skipifconnectfailure.inc'); printf("%d\n", $i++); } while (mysqli_next_result($link)); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[008] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } mysqli_close($link); var_dump(mysqli_more_results($link)); @@ -105,10 +73,14 @@ bool(false) [006] 1 2 + +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 [010] 1 2 +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 -done!
\ No newline at end of file +bool(false) +done! diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt index 91c07c2564..7e4a797158 100644 --- a/ext/mysqli/tests/mysqli_multi_query.phpt +++ b/ext/mysqli/tests/mysqli_multi_query.phpt @@ -10,11 +10,6 @@ require_once('skipifconnectfailure.inc'); <?php require_once("connect.inc"); - $strict_on = false; - if (defined('E_STRICT')) { - error_reporting(((int)ini_get('error_reporting')) | E_STRICT ); - $strict_on = true; - } $tmp = NULL; $link = NULL; @@ -32,9 +27,6 @@ require_once('skipifconnectfailure.inc'); if (!mysqli_multi_query($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM test ORDER BY id LIMIT 3")) printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if ($strict_on) - ob_start(); - $i = 0; do { $res = mysqli_store_result($link); @@ -44,17 +36,6 @@ require_once('skipifconnectfailure.inc'); $i++; } while (mysqli_next_result($link)); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[005a] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } - printf("[006] %d\n", $i); if (!mysqli_multi_query($link, "ALTER TABLE test MODIFY id INT AUTO_INCREMENT; INSERT INTO test(label) VALUES ('a'); SELECT id, label FROM test ORDER BY id")) @@ -74,24 +55,12 @@ require_once('skipifconnectfailure.inc'); if (!mysqli_multi_query($link, "SELECT id, label FROM test")) printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - if ($strict_on) - ob_start(); $i = 0; while (mysqli_next_result($link) && ($res = mysqli_store_result($link))) { while ($row = mysqli_fetch_array($res)) $i++; mysqli_free_result($res); } - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[009a] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } printf("[010] %d\n", $i); if (!mysqli_multi_query($link, "SELECT 1 AS num, 'a' AS somechar; SELECT 2 AS num, 'a' AS somechar; SELECT 3 AS num, 'a' AS somechar")) @@ -151,12 +120,15 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- + +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 [006] 3 [008] 0 [009] [2014] Commands out of sync; you can't run this command now +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 [010] 7 Warning: mysqli_multi_query(): Couldn't fetch mysqli in %s on line %d -NULL -done!
\ No newline at end of file +bool(false) +done! diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt index e42d3b31f3..85a36981b5 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt @@ -40,7 +40,7 @@ max_execution_time=12 print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["SLEEP(6)"]=> string(1) "0" diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt index 1d1b3c917f..a00ab15948 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt @@ -39,7 +39,7 @@ mysqlnd.net_read_timeout=0 print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["SLEEP(2)"]=> string(1) "0" diff --git a/ext/mysqli/tests/mysqli_next_result.phpt b/ext/mysqli/tests/mysqli_next_result.phpt index c36920e1ec..e01f507c20 100644 --- a/ext/mysqli/tests/mysqli_next_result.phpt +++ b/ext/mysqli/tests/mysqli_next_result.phpt @@ -10,12 +10,6 @@ require_once('skipifconnectfailure.inc'); <?php require_once("connect.inc"); - $strict_on = false; - if (defined('E_STRICT')) { - error_reporting(((int)ini_get('error_reporting')) | E_STRICT ); - $strict_on = true; - } - $tmp = NULL; $link = NULL; @@ -27,50 +21,21 @@ require_once('skipifconnectfailure.inc'); require('table.inc'); - if ($strict_on) - ob_start(); - if (false !== ($tmp = mysqli_next_result($link))) printf("[003] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[003a] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - ob_start(); - } - $res = mysqli_query($link, "SELECT 1 AS res"); if (false !== ($tmp = mysqli_next_result($link))) printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), $tmp); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[004a] Strict Standards warning missing\n"); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } - mysqli_free_result($res); - function func_test_mysqli_next_result($link, $query, $offset, $num_results, $strict_on) { + function func_test_mysqli_next_result($link, $query, $offset, $num_results) { if (!mysqli_multi_query($link, $query)) printf("[%03d] [%d] %s\n", $offset, mysqli_errno($link), mysqli_error($link)); $i = 0; - if ($strict_on) - ob_start(); - do { if ($res = mysqli_store_result($link)) { mysqli_free_result($res); @@ -78,17 +43,6 @@ require_once('skipifconnectfailure.inc'); } } while (true === mysqli_next_result($link)); - if ($strict_on) { - $tmp = ob_get_contents(); - ob_end_clean(); - if (!preg_match('@Strict Standards: mysqli_next_result\(\): There is no next result set@ismU', $tmp)) { - printf("[%03d] Strict Standards warning missing\n", $offset + 1); - } else { - $tmp = trim(preg_replace('@Strict Standards: mysqli_next_result\(\).*on line \d+@ism', '', $tmp)); - } - print trim($tmp) . "\n"; - } - if ($i !== $num_results) { printf("[%03d] Expecting %d result(s), got %d result(s)\n", $offset + 2, $num_results, $i); } @@ -104,9 +58,9 @@ require_once('skipifconnectfailure.inc'); } - func_test_mysqli_next_result($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM test ORDER BY id LIMIT 3", 5, 3, $strict_on); - func_test_mysqli_next_result($link, "SELECT 1 AS a; INSERT INTO test(id, label) VALUES (100, 'y'); SELECT 1 AS a, 2 AS b", 8, 2, $strict_on); - func_test_mysqli_next_result($link, "DELETE FROM test WHERE id >= 100; SELECT 1 AS a; ", 11, 1, $strict_on); + func_test_mysqli_next_result($link, "SELECT 1 AS a; SELECT 1 AS a, 2 AS b; SELECT id FROM test ORDER BY id LIMIT 3", 5, 3); + func_test_mysqli_next_result($link, "SELECT 1 AS a; INSERT INTO test(id, label) VALUES (100, 'y'); SELECT 1 AS a, 2 AS b", 8, 2); + func_test_mysqli_next_result($link, "DELETE FROM test WHERE id >= 100; SELECT 1 AS a; ", 11, 1); mysqli_close($link); @@ -119,6 +73,16 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- +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 + +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 + +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 + +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 + +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 -done!
\ No newline at end of file +bool(false) +done! diff --git a/ext/mysqli/tests/mysqli_no_reconnect.phpt b/ext/mysqli/tests/mysqli_no_reconnect.phpt index 653c672077..465f9fee97 100644 --- a/ext/mysqli/tests/mysqli_no_reconnect.phpt +++ b/ext/mysqli/tests/mysqli_no_reconnect.phpt @@ -123,5 +123,5 @@ mysqli.reconnect=0 mysqli_close($link2); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_num_fields.phpt b/ext/mysqli/tests/mysqli_num_fields.phpt index 4c2510af45..f891b309c2 100644 --- a/ext/mysqli/tests/mysqli_num_fields.phpt +++ b/ext/mysqli/tests/mysqli_num_fields.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt index 376ddd4e8f..c6e646e4c3 100644 --- a/ext/mysqli/tests/mysqli_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_num_rows.phpt @@ -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); } @@ -78,12 +78,12 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- -Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in %s on line %d +Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, bool given in %s on line %d -Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in %s on line %d +Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, bool given in %s on line %d 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! diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt index 5daaa597fa..6d5247943b 100644 --- a/ext/mysqli/tests/mysqli_options.phpt +++ b/ext/mysqli/tests/mysqli_options.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt index 4b0c947191..7b98713046 100644 --- a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt +++ b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt @@ -105,5 +105,5 @@ if (!$IS_MYSQLND) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_options_openbasedir.phpt b/ext/mysqli/tests/mysqli_options_openbasedir.phpt index 9457adfb5d..d7b4b6b13e 100644 --- a/ext/mysqli/tests/mysqli_options_openbasedir.phpt +++ b/ext/mysqli/tests/mysqli_options_openbasedir.phpt @@ -25,5 +25,5 @@ if ($IS_MYSQLND) { mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_pam_sha256.phpt b/ext/mysqli/tests/mysqli_pam_sha256.phpt index 3016e200d7..760da471dd 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256.phpt @@ -109,5 +109,5 @@ $link->close(); $link->query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt index afed773b01..1461933015 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt @@ -128,5 +128,5 @@ $link->close(); $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd")); @unlink($file); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt index 1453d663ba..9af480e003 100644 --- a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt +++ b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt @@ -140,7 +140,7 @@ mysqli.max_links=-1 print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["it_works"]=> string(2) "ok" diff --git a/ext/mysqli/tests/mysqli_pconn_kill.phpt b/ext/mysqli/tests/mysqli_pconn_kill.phpt index f8d8d7e8bd..b60bb3662b 100644 --- a/ext/mysqli/tests/mysqli_pconn_kill.phpt +++ b/ext/mysqli/tests/mysqli_pconn_kill.phpt @@ -91,5 +91,5 @@ mysqli.max_persistent=2 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_pconn_limits.phpt b/ext/mysqli/tests/mysqli_pconn_limits.phpt index ee9e1f9cc6..960c4a2635 100644 --- a/ext/mysqli/tests/mysqli_pconn_limits.phpt +++ b/ext/mysqli/tests/mysqli_pconn_limits.phpt @@ -89,7 +89,7 @@ mysqli.max_links=-1 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- Regular connection 1 - 'works..' Regular connection 2 - 'works...' Persistent connection 1 - 'works...' diff --git a/ext/mysqli/tests/mysqli_pconn_twice.phpt b/ext/mysqli/tests/mysqli_pconn_twice.phpt index c550f0f495..c821177eeb 100644 --- a/ext/mysqli/tests/mysqli_pconn_twice.phpt +++ b/ext/mysqli/tests/mysqli_pconn_twice.phpt @@ -65,7 +65,7 @@ mysqli.max_links=-1 print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["it_works"]=> string(2) "ok" diff --git a/ext/mysqli/tests/mysqli_pconnect.phpt b/ext/mysqli/tests/mysqli_pconnect.phpt index 734029acb1..ac17c22b84 100644 --- a/ext/mysqli/tests/mysqli_pconnect.phpt +++ b/ext/mysqli/tests/mysqli_pconnect.phpt @@ -68,5 +68,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_phpinfo.phpt b/ext/mysqli/tests/mysqli_phpinfo.phpt index e23a5f696f..2ecd838592 100644 --- a/ext/mysqli/tests/mysqli_phpinfo.phpt +++ b/ext/mysqli/tests/mysqli_phpinfo.phpt @@ -68,5 +68,5 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_ping.phpt b/ext/mysqli/tests/mysqli_ping.phpt index d9a134c0e9..6ddb29efef 100644 --- a/ext/mysqli/tests/mysqli_ping.phpt +++ b/ext/mysqli/tests/mysqli_ping.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_prepare.phpt b/ext/mysqli/tests/mysqli_prepare.phpt index d6d6c092b9..0c3bedf5b5 100644 --- a/ext/mysqli/tests/mysqli_prepare.phpt +++ b/ext/mysqli/tests/mysqli_prepare.phpt @@ -130,6 +130,6 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test2")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- bool(false) done! diff --git a/ext/mysqli/tests/mysqli_prepare_no_object.phpt b/ext/mysqli/tests/mysqli_prepare_no_object.phpt index e45de69eda..b10706aa04 100644 --- a/ext/mysqli/tests/mysqli_prepare_no_object.phpt +++ b/ext/mysqli/tests/mysqli_prepare_no_object.phpt @@ -38,7 +38,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- a) [1065] Query was empty b) [1065] Query was empty c) [1065] Query was empty diff --git a/ext/mysqli/tests/mysqli_ps_select_union.phpt b/ext/mysqli/tests/mysqli_ps_select_union.phpt index 730dc8403b..cb5699fc1e 100644 --- a/ext/mysqli/tests/mysqli_ps_select_union.phpt +++ b/ext/mysqli/tests/mysqli_ps_select_union.phpt @@ -251,7 +251,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- Using CAST('somestring' AS CHAR)... string(3) "one" string(5) "three" diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt index 4b1988b631..bfa703bb01 100644 --- a/ext/mysqli/tests/mysqli_query.phpt +++ b/ext/mysqli/tests/mysqli_query.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_query_stored_proc.phpt b/ext/mysqli/tests/mysqli_query_stored_proc.phpt index 4f4e671f3b..1df5cc8760 100644 --- a/ext/mysqli/tests/mysqli_query_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_query_stored_proc.phpt @@ -163,7 +163,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- array(2) { ["id"]=> string(1) "1" diff --git a/ext/mysqli/tests/mysqli_query_unicode.phpt b/ext/mysqli/tests/mysqli_query_unicode.phpt index a7540c5426..819a849d94 100644 --- a/ext/mysqli/tests/mysqli_query_unicode.phpt +++ b/ext/mysqli/tests/mysqli_query_unicode.phpt @@ -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!"; ?> diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt index a678399838..dcc7ad5715 100644 --- a/ext/mysqli/tests/mysqli_real_connect.phpt +++ b/ext/mysqli/tests/mysqli_real_connect.phpt @@ -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 diff --git a/ext/mysqli/tests/mysqli_real_escape_string.phpt b/ext/mysqli/tests/mysqli_real_escape_string.phpt index 6c372581e0..05588cac63 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt index b177c1fd5b..20384d9a0f 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt @@ -2,8 +2,6 @@ mysqli_real_escape_string() - big5 --SKIPIF-- <?php -if (ini_get('unicode.semantics')) - die("skip Test cannot be run in unicode mode"); require_once('skipif.inc'); require_once('skipifemb.inc'); @@ -76,7 +74,7 @@ mysqli_error($link)); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt index cf4afb6f6b..14bf97c635 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt @@ -2,8 +2,6 @@ mysqli_real_escape_string() - eucjpms --SKIPIF-- <?php -if (ini_get('unicode.semantics')) - die("skip Test cannot be run in unicode mode"); require_once('skipif.inc'); require_once('skipifemb.inc'); @@ -69,7 +67,7 @@ mysqli_error($link)); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt index 7ac7497b80..cff45e06d4 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt @@ -2,8 +2,6 @@ mysqli_real_escape_string() - euckr --SKIPIF-- <?php -if (ini_get('unicode.semantics')) - die("skip Test cannot be run in unicode mode"); require_once('skipif.inc'); require_once('skipifemb.inc'); @@ -68,7 +66,7 @@ mysqli_error($link)); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt index b93d8154fa..537ac7292f 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt @@ -2,8 +2,6 @@ mysqli_real_escape_string() - gb2312 --SKIPIF-- <?php -if (ini_get('unicode.semantics')) - die("skip Test cannot be run in unicode mode"); require_once('skipif.inc'); require_once('skipifemb.inc'); @@ -69,7 +67,7 @@ mysqli_error($link)); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt index 945e1eaed7..85ac847666 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt @@ -67,7 +67,7 @@ mysqli_error($link)); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt b/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt index a121d5fb8f..47535f937e 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt @@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- array(1) { ["label"]=> string(1) "\" diff --git a/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt b/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt index ae4986e0b1..9e1562dba0 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt @@ -46,7 +46,7 @@ mysqli_close($link); mysqli_close($link); print "done!"; ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt index 72d171f9e5..b3465ad2b1 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt index efc3eaa29f..9b99435d42 100644 --- a/ext/mysqli/tests/mysqli_real_query.phpt +++ b/ext/mysqli/tests/mysqli_real_query.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_reap_async_query.phpt b/ext/mysqli/tests/mysqli_reap_async_query.phpt index 3f3bce3292..b43b6b2478 100644 --- a/ext/mysqli/tests/mysqli_reap_async_query.phpt +++ b/ext/mysqli/tests/mysqli_reap_async_query.phpt @@ -87,7 +87,7 @@ if (!$IS_MYSQLND) print "done!"; ?> ---EXPECTF-- +--EXPECT-- [012 + 2] array ( '_one' => '1', ) diff --git a/ext/mysqli/tests/mysqli_reconnect.phpt b/ext/mysqli/tests/mysqli_reconnect.phpt index 7f05a20d2f..606d380285 100644 --- a/ext/mysqli/tests/mysqli_reconnect.phpt +++ b/ext/mysqli/tests/mysqli_reconnect.phpt @@ -126,5 +126,5 @@ mysqli.reconnect=1 mysqli_close($link2); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt index e565e184ee..33e5a1f1da 100644 --- a/ext/mysqli/tests/mysqli_result_references.phpt +++ b/ext/mysqli/tests/mysqli_result_references.phpt @@ -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){ diff --git a/ext/mysqli/tests/mysqli_rollback.phpt b/ext/mysqli/tests/mysqli_rollback.phpt index be49000315..8f2a13b96c 100644 --- a/ext/mysqli/tests/mysqli_rollback.phpt +++ b/ext/mysqli/tests/mysqli_rollback.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt index f58a19bea3..041b7fbb22 100644 --- a/ext/mysqli/tests/mysqli_select_db.phpt +++ b/ext/mysqli/tests/mysqli_select_db.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt index ed534fa71e..df90333867 100644 --- a/ext/mysqli/tests/mysqli_set_charset.phpt +++ b/ext/mysqli/tests/mysqli_set_charset.phpt @@ -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!"; ?> diff --git a/ext/mysqli/tests/mysqli_set_opt.phpt b/ext/mysqli/tests/mysqli_set_opt.phpt index 7c96d5980d..757b8490b7 100644 --- a/ext/mysqli/tests/mysqli_set_opt.phpt +++ b/ext/mysqli/tests/mysqli_set_opt.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt index 56580cda46..b36291872e 100644 --- a/ext/mysqli/tests/mysqli_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_sqlstate.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt index 2abae55c1e..8463cc58b8 100644 --- a/ext/mysqli/tests/mysqli_ssl_set.phpt +++ b/ext/mysqli/tests/mysqli_ssl_set.phpt @@ -57,5 +57,5 @@ if (!function_exists('mysqli_ssl_set')) */ print "done!\n"; ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stat.phpt b/ext/mysqli/tests/mysqli_stat.phpt index f1cd56ccd1..2507a4c8f8 100644 --- a/ext/mysqli/tests/mysqli_stat.phpt +++ b/ext/mysqli/tests/mysqli_stat.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt index 7fc32f7e61..1e08f0dec3 100644 --- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt @@ -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); diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt index a4eb4d0f35..92937a15ce 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt @@ -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); } } @@ -66,5 +66,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt index 0d5e8f9bec..e05843e5b7 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt @@ -25,5 +25,5 @@ die("SKIP: prefetch isn't supported at the moment"); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index c2ddd21198..b3d60380cb 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -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"); @@ -273,5 +273,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt index d7a78f1cf0..5ad6f583e7 100644 --- a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt @@ -46,5 +46,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt index 39c602034d..0daab8b11a 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt @@ -115,7 +115,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- Testing 273 columns with 240 rows... ... table created ... statement with 65520 parameters prepared diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt index 97b15242dc..a8a18ace85 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt @@ -328,7 +328,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- Regular, procedural, using variables int(1) string(1) "a" diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt index 29a5ee3fbd..5800a9bcc0 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt @@ -96,7 +96,7 @@ memory_limit=256M <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- int(1) executing bool(true) diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt index 58626be672..e7b581f815 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt @@ -203,5 +203,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt index daab40c506..2e3df083b7 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt @@ -123,5 +123,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index 52e9d4b24b..dcd05e5f68 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -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)); diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt index acf0d0be2d..3818b6ccfd 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt @@ -155,5 +155,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt index 68ec601e10..64b0b192ff 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt @@ -337,5 +337,5 @@ memory_limit=83886080 <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt index 56508533ba..6d096531e8 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt @@ -93,5 +93,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt index 64e76e54ce..6ea64e815a 100644 --- a/ext/mysqli/tests/mysqli_stmt_close.phpt +++ b/ext/mysqli/tests/mysqli_stmt_close.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt index a1cebeae80..f9224eef62 100644 --- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt index 3380f0edbb..957044cd67 100644 --- a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt @@ -66,7 +66,7 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS type_change")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) ---- Row 1 diff --git a/ext/mysqli/tests/mysqli_stmt_errno.phpt b/ext/mysqli/tests/mysqli_stmt_errno.phpt index 070f2514a2..d98a98b87a 100644 --- a/ext/mysqli/tests/mysqli_stmt_errno.phpt +++ b/ext/mysqli/tests/mysqli_stmt_errno.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt index e18aa07f32..ad8efef602 100644 --- a/ext/mysqli/tests/mysqli_stmt_error.phpt +++ b/ext/mysqli/tests/mysqli_stmt_error.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt index 85ae80c51e..d97111a6fd 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt index 29e3947a78..f9ab267502 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt @@ -194,5 +194,5 @@ if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch")) mysqli_close($link); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt index 35433b136a..293761bb84 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt @@ -125,7 +125,7 @@ mysqli_close($link); ?> --XFAIL-- Unsupported and undefined, under development ---EXPECTF-- +--EXPECT-- [010] More results: yes [011] Next result: yes done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_fetch.phpt b/ext/mysqli/tests/mysqli_stmt_fetch.phpt index 7598ffeb1b..4b41c9213d 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt index 2a2914ad88..49ca6f6bff 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt @@ -72,5 +72,5 @@ Fetching BIT column values using the PS API <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt index 0cbc05f6c7..14333e7665 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt @@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- OK: 1 OK: 2 done! diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt index 84998b9423..00bde68284 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt @@ -137,5 +137,5 @@ mysqli_stmt_fetch - geometry / spatial types <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt index 7dfd3a400c..847fe04a3b 100644 --- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt index 08b33b7959..292905ab63 100644 --- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt index 58d7c2fa72..e8f2843920 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt index 48f7ed8f30..00ed7adee4 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt index 6c476f7e9d..87dd01223f 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt @@ -129,5 +129,5 @@ Fetching BIT column values using the PS API <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt index 046f90438e..a717bee50d 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt @@ -45,6 +45,6 @@ mysqli_stmt_get_result() - meta data, field_count() <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- 2 2 done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt index c86a385bee..9bfd7d6958 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt @@ -139,5 +139,5 @@ mysqli_stmt_get_result - geometry / spatial types <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt index 879e87f0d8..febc659167 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt index c057f7d9fb..1cd2981ed2 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt @@ -38,7 +38,7 @@ if (!function_exists('mysqli_stmt_get_result')) $found = false; foreach ($engines as $k => $engine) foreach ($engine as $k => $v) - if (stristr('MyISAM', $v)) { + if (stristr($v, 'MyISAM')) { $found = true; break; } @@ -91,5 +91,5 @@ if (!function_exists('mysqli_stmt_get_result')) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt index 31eb574422..51198523c9 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt @@ -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!"; ?> @@ -118,7 +118,7 @@ if (!function_exists('mysqli_stmt_get_result')) require_once("clean_table.inc"); ?> --EXPECTF-- -Warning: mysqli_result::data_seek() expects parameter 1 to be integer, float given in %s on line %d +Warning: mysqli_result::data_seek() expects parameter 1 to be int, float given in %s on line %d Warning: mysqli_data_seek(): Couldn't fetch mysqli_result in %s on line %d diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt index 7b6d3c26a0..7d21558593 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt @@ -253,5 +253,5 @@ mysqli_stmt_get_result - data types <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt index 69755865e9..1ebe6d051f 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt index 4f09719c87..b82a855dd2 100644 --- a/ext/mysqli/tests/mysqli_stmt_init.phpt +++ b/ext/mysqli/tests/mysqli_stmt_init.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt index c7a5affd9d..e3ef9a25ec 100644 --- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_multires.phpt b/ext/mysqli/tests/mysqli_stmt_multires.phpt index 28cf5e38f4..b95bfd7f91 100644 --- a/ext/mysqli/tests/mysqli_stmt_multires.phpt +++ b/ext/mysqli/tests/mysqli_stmt_multires.phpt @@ -99,7 +99,7 @@ require_once('skipifconnectfailure.inc'); printf("[001] [%d] %s\n", $link->error, $link->errno); } ?> ---EXPECTF-- +--EXPECT-- string(4) "pre:" NULL NULL diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt index a1f5e89c7a..5355b3deb7 100644 --- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt index 3526956898..e847d165f6 100644 --- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt index 3eb576aec3..d0e38075d9 100644 --- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt @@ -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!"; diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt index d731da2f5e..b7ec4e3ed7 100644 --- a/ext/mysqli/tests/mysqli_stmt_reset.phpt +++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt index 5fd76a2628..c53101a096 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt index a7dad1b47c..44c1f1bdcc 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt @@ -228,5 +228,5 @@ die("skip Check again when the Klingons visit earth - http://bugs.mysql.com/bug. <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt index a1fc2007fe..eeb74d9093 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt @@ -94,5 +94,5 @@ if (stristr(mysqli_get_client_info(), 'mysqlnd')) <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt index 95d2302f4c..07acb041b5 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt @@ -99,5 +99,5 @@ Warning: mysqli_stmt_send_long_data(): There was an error while sending long dat <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt index 5ea35df240..1784106162 100644 --- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt index a6411ca937..89b8ed3bf8 100644 --- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt @@ -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); @@ -86,5 +86,5 @@ require_once('skipifconnectfailure.inc'); <?php require_once("clean_table.inc"); ?> ---EXPECTF-- -done!
\ No newline at end of file +--EXPECT-- +done! diff --git a/ext/mysqli/tests/mysqli_store_result.phpt b/ext/mysqli/tests/mysqli_store_result.phpt index c61c124daf..b87d147e38 100644 --- a/ext/mysqli/tests/mysqli_store_result.phpt +++ b/ext/mysqli/tests/mysqli_store_result.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt index 2dec703b99..58d588ac49 100644 --- a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt +++ b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt @@ -37,5 +37,5 @@ mysqlnd.debug=d:t:O,/tmp/mysqlnd.trace <?php require_once("clean_table.inc"); ?> ---EXPECTF-- +--EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_thread_id.phpt b/ext/mysqli/tests/mysqli_thread_id.phpt index 3a7e1ae5da..4a71d60f41 100644 --- a/ext/mysqli/tests/mysqli_thread_id.phpt +++ b/ext/mysqli/tests/mysqli_thread_id.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_thread_safe.phpt b/ext/mysqli/tests/mysqli_thread_safe.phpt index 0777c2abd7..2f6a87ba42 100644 --- a/ext/mysqli/tests/mysqli_thread_safe.phpt +++ b/ext/mysqli/tests/mysqli_thread_safe.phpt @@ -12,5 +12,5 @@ require_once('skipifemb.inc'); print "done!"; ?> ---EXPECTF-- +--EXPECT-- done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt index 25d16926a8..190cafa5d5 100644 --- a/ext/mysqli/tests/mysqli_use_result.phpt +++ b/ext/mysqli/tests/mysqli_use_result.phpt @@ -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! diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt index cff9c02b1f..9d59f26e52 100644 --- a/ext/mysqli/tests/mysqli_warning_count.phpt +++ b/ext/mysqli/tests/mysqli_warning_count.phpt @@ -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! |