From: Adam Dickmeiss Date: Tue, 27 May 2003 09:50:49 +0000 (+0000) Subject: Fix close of log file. X-Git-Tag: php-4.3.2RC4~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5b3d65f07d869b1ac729a6a1eefa1e4fb35f2dc;p=php Fix close of log file. --- diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 7c4962b302..e4933b7d21 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -1477,16 +1477,17 @@ PHP_MINIT_FUNCTION(yaz) #ifdef ZTS yaz_mutex = tsrm_mutex_alloc(); #endif - yaz_log_init_file ("/dev/null"); ZEND_INIT_MODULE_GLOBALS(yaz, php_yaz_init_globals, NULL); - REGISTER_INI_ENTRIES(); + REGISTER_INI_ENTRIES(); - if (YAZSG(log_file)) - { - yaz_log_init_file(YAZSG(log_file)); - yaz_log_init_level (LOG_ALL); - } + if (YAZSG(log_file)) + { + yaz_log_init_file(YAZSG(log_file)); + yaz_log_init_level(LOG_ALL); + } + else + yaz_log_init_level(0); le_link = zend_register_list_destructors_ex (yaz_close_link, 0, "YAZ link", module_number); order_associations = 1; @@ -1511,6 +1512,7 @@ PHP_MSHUTDOWN_FUNCTION(yaz) #ifdef ZTS tsrm_mutex_free (yaz_mutex); #endif + yaz_log_init_file(0); return SUCCESS; }