diff options
author | Xinchen Hui <laruence@php.net> | 2014-06-23 19:34:23 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-06-23 19:34:55 +0800 |
commit | 56a966e88a98bf04b2cd253b9b18136c0cc4028b (patch) | |
tree | b676c55d97100d30ea965eeb1bdf812898e757d3 /ext/mysql/php_mysql.c | |
parent | 92a708989380bfb5d5da00665895025398bdbc91 (diff) | |
download | php-git-56a966e88a98bf04b2cd253b9b18136c0cc4028b.tar.gz |
Respect the origin behavior (fix one test: ext/pdo_mysql/tests/bug_33689.phpt)
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r-- | ext/mysql/php_mysql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index db02c24f9a..cbef4e6960 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2426,7 +2426,7 @@ PHP_FUNCTION(mysql_fetch_field) #if MYSQL_USE_MYSQLND add_property_str(return_value, "name", STR_COPY(mysql_field->name)); add_property_str(return_value, "table", STR_COPY(mysql_field->table)); - add_property_str(return_value, "def", STR_COPY(mysql_field->def)); + add_property_str(return_value, "def", mysql_field->def? STR_COPY(mysql_field->def) : STR_EMPTY_ALLOC()); #else add_property_string(return_value, "name", (mysql_field->name?mysql_field->name:"")); add_property_string(return_value, "table", (mysql_field->table?mysql_field->table:"")); |