diff options
| author | Antony Dovgal <tony2001@php.net> | 2004-12-30 11:57:40 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2004-12-30 11:57:40 +0000 |
| commit | 72b45bdab0600fbb95b8b31696aa318123fa0bfb (patch) | |
| tree | d0dc64ddce3c444c2ef31ef9bb33b207e0be6439 /ext/tidy/tidy.c | |
| parent | 8078fc1f6d220559024bbf736719e8676a89ec01 (diff) | |
| download | php-git-72b45bdab0600fbb95b8b31696aa318123fa0bfb.tar.gz | |
MFH
Diffstat (limited to 'ext/tidy/tidy.c')
| -rw-r--r-- | ext/tidy/tidy.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index ec0151e8ca..0666f35df7 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -428,15 +428,17 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil TIDY_SET_DEFAULT_CONFIG(doc); /* We can't use TIDY_APPLY_CONFIG_ZVAL() here, it uses RETURN_FALSE */ - - 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_SAFE_MODE_CHECK(Z_STRVAL_P(config)); - if (tidyLoadConfig(doc, Z_STRVAL_P(config)) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file '%s'", Z_STRVAL_P(config)); - RETVAL_FALSE; + + if (ZEND_NUM_ARGS() > 1) { + 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_SAFE_MODE_CHECK(Z_STRVAL_P(config)); + if (tidyLoadConfig(doc, Z_STRVAL_P(config)) < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not load configuration file '%s'", Z_STRVAL_P(config)); + RETVAL_FALSE; + } } } |
