diff options
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r-- | ext/mysqli/mysqli_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index c70971cc82..dab3cd73a2 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1153,7 +1153,7 @@ static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRML add_property_str(value, "orgname", STR_COPY(field->org_name)); add_property_str(value, "table", STR_COPY(field->table)); add_property_str(value, "orgtable", STR_COPY(field->org_table)); - add_property_str(value, "def", STR_COPY(field->def)); + add_property_str(value, "def", field->def? STR_COPY(field->def) : STR_EMPTY_ALLOC()); add_property_str(value, "db", STR_COPY(field->db)); #else add_property_string(value, "name",(field->name ? field->name : "")); |