com php-src: Use defined macro: ext/tidy/tidy.c

From: Date: Wed, 14 May 2014 08:54:14 +0000
Subject: com php-src: Use defined macro: ext/tidy/tidy.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78348@lists.php.net to get a copy of this message
Commit: b57b1ff49545478a56537d0d5cc8322d8334ae9d Author: Xinchen Hui <laruence@php.net> Wed, 14 May 2014 16:54:14 +0800 Parents: 0f6c93d620c62bf0d32b75d0937b4834cb6711bc Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b57b1ff49545478a56537d0d5cc8322d8334ae9d Log: Use defined macro Changed paths: M ext/tidy/tidy.c Diff: diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index c9f9107..5617dca 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -592,20 +592,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil TIDY_SET_DEFAULT_CONFIG(doc); if (config) { - if(Z_TYPE_P(config) == IS_ARRAY) { - _php_tidy_apply_config_array(doc, HASH_OF(config) TSRMLS_CC); - } else { - convert_to_string_ex(config); - TIDY_OPEN_BASE_DIR_CHECK(Z_STRVAL_P(config)); - switch (tidyLoadConfig(doc, Z_STRVAL_P(config))) { - case -1: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file '%s'", Z_STRVAL_P(config)); - break; - case 1: - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There were errors while parsing the configuration file '%s'", Z_STRVAL_P(config)); - break; - } - } + TIDY_APPLY_CONFIG_ZVAL(doc, config); } if(enc_len) {

« previous php.cvs (#78348) next »