diff options
author | Adam Dickmeiss <dickmeiss@php.net> | 2003-05-30 09:46:01 +0000 |
---|---|---|
committer | Adam Dickmeiss <dickmeiss@php.net> | 2003-05-30 09:46:01 +0000 |
commit | ea8eefdf7282173b79f45462d43b6ac2abe81bba (patch) | |
tree | ee843a3948657cb6d5dc3c14db7f06a84759072a | |
parent | ae7fadf90003e570601a5fdcd1bda3fe1a0f6161 (diff) | |
download | php-git-ea8eefdf7282173b79f45462d43b6ac2abe81bba.tar.gz |
Prevent yaz from logging unless yaz.log_file is set
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/yaz/php_yaz.c | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Jul 2003, Version 4.3.3 +- Prevent yaz from logging unless yaz.log_file is set (Adam Dickmeiss) - Added long options into CLI & CGI (e.g. --version). (Marcus) - Added new command line parameters -B, -F, -R and -E which allow to process stdin line by line (See 'php -h' or 'man php' for more). (Marcus) diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index e4933b7d21..ee6b30a809 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -1473,6 +1473,7 @@ PHP_INI_BEGIN() PHP_MINIT_FUNCTION(yaz) { int i; + const char *fname; nmem_init(); #ifdef ZTS yaz_mutex = tsrm_mutex_alloc(); @@ -1481,9 +1482,10 @@ PHP_MINIT_FUNCTION(yaz) REGISTER_INI_ENTRIES(); - if (YAZSG(log_file)) + fname = YAZSG(log_file); + if (fname && *fname) { - yaz_log_init_file(YAZSG(log_file)); + yaz_log_init_file(fname); yaz_log_init_level(LOG_ALL); } else |