Corrected bug in php_mysql_fetch_hash() that prevented columns with NULL values from having both numeric and associative indexes. (Bug 14291)

This commit is contained in:
Zak Greant 2001-12-30 10:00:26 +00:00
parent 59a45acca6
commit 3ac1646ef2

View file

@ -1633,10 +1633,13 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
}
} else {
/* NULL value. */
if (result_type & MYSQL_NUM)
if (result_type & MYSQL_NUM) {
add_index_null(return_value, i);
else
}
if (result_type & MYSQL_ASSOC) {
add_assoc_null(return_value, mysql_field->name);
}
}
}
}