mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
@- NULL values are now preserved in the return value of mysql_fetch_array()
@ and mysql_fetch_object(). (Andrei)
This commit is contained in:
parent
10503a3b92
commit
fe24b820be
1 changed files with 5 additions and 2 deletions
|
@ -1317,8 +1317,11 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
|
|||
add_assoc_stringl(return_value, mysql_field->name, data, data_len, should_copy);
|
||||
}
|
||||
} else {
|
||||
/* NULL field, don't set it */
|
||||
/* add_get_index_stringl(return_value, i, empty_string, 0, (void **) &pval_ptr); */
|
||||
/* NULL value. */
|
||||
if (result_type & MYSQL_NUM)
|
||||
add_index_unset(return_value, i);
|
||||
else
|
||||
add_assoc_unset(return_value, mysql_field->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue