diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-03-21 15:35:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-03-21 15:35:28 +0000 |
commit | d76e149f0ee45f0bc69f385ad1b083dba09995ce (patch) | |
tree | 0cb2f7092120838d4139a84538208d778099a411 | |
parent | 7019b978a08e5295f5528a026aa0500041c0cfa5 (diff) | |
download | php-git-d76e149f0ee45f0bc69f385ad1b083dba09995ce.tar.gz |
Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection).
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/mysqli/mysqli_nonapi.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -12,6 +12,8 @@ PHP NEWS - Fixed debug_zval_dump() to support private and protected members. (Dmitry) - Fixed bug #36809 (__FILE__ behavior changed). (Dmitry) - Fixed bug #36808 (syslog ident becomes garbage between requests). (Tony) +- Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection). + (Ilia) - Fixed bug #36721 (The SoapServer is not able to send a header that it didn't receive). (Dmitry) - Fixed bug #36756 (DOMDocument::removeChild corrupts node). (Rob) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 99a3f03023..9c031fab6c 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -326,7 +326,7 @@ PHP_FUNCTION(mysqli_set_charset) } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link"); - if (mysql_set_character_set(mysql->mysql, cs_name)) { + if (!mysql->mysql->thread_id || mysql_set_character_set(mysql->mysql, cs_name)) { RETURN_FALSE; } RETURN_TRUE; |