Skip to content

Commit b57b1ff

Browse files
committed
Use defined macro
1 parent 0f6c93d commit b57b1ff

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

ext/tidy/tidy.c

+1-14
Original file line numberDiff line numberDiff line change
@@ -592,20 +592,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
592592
TIDY_SET_DEFAULT_CONFIG(doc);
593593

594594
if (config) {
595-
if(Z_TYPE_P(config) == IS_ARRAY) {
596-
_php_tidy_apply_config_array(doc, HASH_OF(config) TSRMLS_CC);
597-
} else {
598-
convert_to_string_ex(config);
599-
TIDY_OPEN_BASE_DIR_CHECK(Z_STRVAL_P(config));
600-
switch (tidyLoadConfig(doc, Z_STRVAL_P(config))) {
601-
case -1:
602-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file '%s'", Z_STRVAL_P(config));
603-
break;
604-
case 1:
605-
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There were errors while parsing the configuration file '%s'", Z_STRVAL_P(config));
606-
break;
607-
}
608-
}
595+
TIDY_APPLY_CONFIG_ZVAL(doc, config);
609596
}
610597

611598
if(enc_len) {

0 commit comments

Comments
 (0)