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);
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) {