summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-06-23 19:34:23 +0800
committerXinchen Hui <laruence@php.net>2014-06-23 19:34:55 +0800
commit56a966e88a98bf04b2cd253b9b18136c0cc4028b (patch)
treeb676c55d97100d30ea965eeb1bdf812898e757d3 /ext/mysqli/mysqli_api.c
parent92a708989380bfb5d5da00665895025398bdbc91 (diff)
downloadphp-git-56a966e88a98bf04b2cd253b9b18136c0cc4028b.tar.gz
Respect the origin behavior (fix one test: ext/pdo_mysql/tests/bug_33689.phpt)
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c2
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 : ""));