From 56a966e88a98bf04b2cd253b9b18136c0cc4028b Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 23 Jun 2014 19:34:23 +0800 Subject: Respect the origin behavior (fix one test: ext/pdo_mysql/tests/bug_33689.phpt) --- ext/mysql/php_mysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysql/php_mysql.c') 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:"")); -- cgit v1.2.1