From 8c7c16509bbc4326ee0f9eccecab5b153094d77c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 30 May 2003 09:48:50 +0000 Subject: [PATCH] Prevent yaz from logging unless yaz.log_file is set --- ext/yaz/php_yaz.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 51d0175429..88999c9051 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -1492,6 +1492,7 @@ PHP_INI_END() PHP_MINIT_FUNCTION(yaz) { int i; + const char *fname; nmem_init(); #ifdef ZTS yaz_mutex = tsrm_mutex_alloc(); @@ -1501,12 +1502,14 @@ PHP_MINIT_FUNCTION(yaz) REGISTER_INI_ENTRIES(); - if (YAZSG(log_file)) { + fname = YAZSG(log_file); + if (fname && *fname) + { + yaz_log_init_file(fname); yaz_log_init_level(LOG_ALL); - yaz_log_init_file(YAZSG(log_file)); - } else { - yaz_log_init_level(0); } + else + yaz_log_init_level(0); le_link = zend_register_list_destructors_ex (yaz_close_link, 0, "YAZ link", module_number); -- 2.50.1