diff options
Diffstat (limited to 'ext/mysqli/mysqli.c')
-rw-r--r-- | ext/mysqli/mysqli.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 7a5ce3335..90d941991 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli.c,v 1.72.2.16.2.21 2007/10/22 10:35:33 andrey Exp $ + $Id: mysqli.c,v 1.72.2.16.2.25 2008/03/08 14:59:37 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -669,7 +669,7 @@ PHP_MSHUTDOWN_FUNCTION(mysqli) #ifdef PHP_WIN32 unsigned long client_ver = mysql_get_client_version(); /* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */ - if ((client_ver > 50042 && client_ver < 50100) || client_ver > 50122) { + if ((client_ver >= 50046 && client_ver < 50100) || client_ver > 50122) { mysql_server_end(); } #else @@ -693,7 +693,7 @@ PHP_MSHUTDOWN_FUNCTION(mysqli) */ PHP_RINIT_FUNCTION(mysqli) { -#ifdef ZTS && MYSQL_VERSION_ID >= 40000 +#if defined(ZTS) && MYSQL_VERSION_ID >= 40000 if (mysql_thread_init()) { return FAILURE; } @@ -709,7 +709,7 @@ PHP_RINIT_FUNCTION(mysqli) */ PHP_RSHUTDOWN_FUNCTION(mysqli) { -#ifdef ZTS && MYSQL_VERSION_ID >= 40000 +#if defined(ZTS) && MYSQL_VERSION_ID >= 40000 mysql_thread_end(); #endif if (MyG(error_msg)) { @@ -1194,7 +1194,9 @@ void php_local_infile_end(void *ptr) return; } - php_stream_close(mysql->li_stream); + if (mysql->li_stream) { + php_stream_close(mysql->li_stream); + } free(data); return; } |