]> granicus.if.org Git - php/commitdiff
Prevent yaz from logging unless yaz.log_file is set
authorAdam Dickmeiss <dickmeiss@php.net>
Fri, 30 May 2003 09:46:01 +0000 (09:46 +0000)
committerAdam Dickmeiss <dickmeiss@php.net>
Fri, 30 May 2003 09:46:01 +0000 (09:46 +0000)
NEWS
ext/yaz/php_yaz.c

diff --git a/NEWS b/NEWS
index 5f597c52d5b185985e27f1b47636a49262cba701..2911bc6ba703c11644eb708df6a67a2a2ffe442f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index e4933b7d212e4693ac9442962a79b46b37b31c91..ee6b30a8090cde4b10aaac5fe9eedde80099b42e 100644 (file)
@@ -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