diff options
author | Johannes Schlüter <johannes@php.net> | 2009-11-12 18:01:21 +0000 |
---|---|---|
committer | Johannes Schlüter <johannes@php.net> | 2009-11-12 18:01:21 +0000 |
commit | 0463aa400a69298e4fac552463b37e6136ad72d3 (patch) | |
tree | 4146ecb9bdd83b2ef6fd076b7b8289705c10f2c0 /ext/mysqli/mysqli_nonapi.c | |
parent | a47410d68e3feab1f2fb1e4af88752803caa7b9b (diff) | |
parent | dd8b782bc85280a2bf35fd032809c8aff6e85d29 (diff) | |
download | php-git-php-5.3.1RC4.tar.gz |
5.3.1RC4php-5.3.1RC4
# hope even with this fixes we can be fast with testing this ...
Diffstat (limited to 'ext/mysqli/mysqli_nonapi.c')
-rw-r--r-- | ext/mysqli/mysqli_nonapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 187b9bec30..9b384132fc 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -46,7 +46,11 @@ static void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRMLS_DC) if (MyG(error_msg)) { efree(MyG(error_msg)); } - MyG(error_msg) = estrdup(mysql_err); + if(mysql_err && *mysql_err) { + MyG(error_msg) = estrdup(mysql_err); + } else { + MyG(error_msg) = NULL; + } } /* }}} */ |