cvs: php4 /ext/xslt sablot.c

From: Date: Tue, 26 Jun 2001 22:48:44 +0000
Subject: cvs: php4 /ext/xslt sablot.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-6031@lists.php.net to get a copy of this message
sterling Wed Jun 27 00:48:44 2001 EDT Modified files: /php4/ext/xslt sablot.c Log: Making logging optional. Index: php4/ext/xslt/sablot.c diff -u php4/ext/xslt/sablot.c:1.12 php4/ext/xslt/sablot.c:1.13 --- php4/ext/xslt/sablot.c:1.12 Tue Jun 26 20:20:27 2001 +++ php4/ext/xslt/sablot.c Wed Jun 27 00:48:43 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sablot.c,v 1.12 2001/06/26 18:20:27 sterling Exp $ */ +/* $Id: sablot.c,v 1.13 2001/06/26 22:48:43 sterling Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -436,8 +436,15 @@ WRONG_PARAM_COUNT; } ZEND_FETCH_RESOURCE(handle, php_xslt *, processor_p, -1, le_xslt_name, le_xslt); - convert_to_string_ex(logfile); + if (Z_TYPE_PP(logfile) == IS_LONG) { + XSLT_LOG(handle).do_log = Z_LVAL_PP(logfile); + RETURN_NULL(); + } + else { + convert_to_string_ex(logfile); + } + /* If the log file already exists, free it */ if (XSLT_LOG(handle).path) { efree(XSLT_LOG(handle).path); @@ -1255,6 +1262,9 @@ char msgformat[] = "Sablotron Message on line %s, level %s: %s\n"; /* Message format */ int error = 0; /* Error container */ + if (!XSLT_LOG(handle).do_log) + return 0; + /* Parse the error array */ /* Loop through the error array */ if (fields) {

« previous php.cvs (#6031) next »