diff options
author | Adam Dickmeiss <dickmeiss@php.net> | 2003-05-30 09:48:50 +0000 |
---|---|---|
committer | Adam Dickmeiss <dickmeiss@php.net> | 2003-05-30 09:48:50 +0000 |
commit | 8c7c16509bbc4326ee0f9eccecab5b153094d77c (patch) | |
tree | 3cc58cee86ac4763b07e2c5ed56e8f86114e2b65 /ext/yaz | |
parent | 76ff0be76820fe42cd5ff67e0c001e6652396a29 (diff) | |
download | php-git-8c7c16509bbc4326ee0f9eccecab5b153094d77c.tar.gz |
Prevent yaz from logging unless yaz.log_file is set
Diffstat (limited to 'ext/yaz')
-rw-r--r-- | ext/yaz/php_yaz.c | 11 |
1 files 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); |