summaryrefslogtreecommitdiff
path: root/ext/tidy/tidy.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2011-06-12 14:49:10 +0000
committerRasmus Lerdorf <rasmus@php.net>2011-06-12 14:49:10 +0000
commitfb2ce0bb009c7eec8a6dfa5f3228b5020a255bbb (patch)
treee419350b7f113be6201272efc27d421079192823 /ext/tidy/tidy.c
parent7a0bd8b9670092ac93457e499ed080df116aeeec (diff)
downloadphp-git-fb2ce0bb009c7eec8a6dfa5f3228b5020a255bbb.tar.gz
Don't expect a path for tidy_repair_string() and fix the tests
Diffstat (limited to 'ext/tidy/tidy.c')
-rw-r--r--ext/tidy/tidy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c
index cf8e290569..2b859683f3 100644
--- a/ext/tidy/tidy.c
+++ b/ext/tidy/tidy.c
@@ -558,15 +558,17 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
TidyBuffer *errbuf;
zval **config = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|Zsb", &arg1, &arg1_len, &config, &enc, &enc_len, &use_include_path) == FAILURE) {
- RETURN_FALSE;
- }
-
if (is_file) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|Zsb", &arg1, &arg1_len, &config, &enc, &enc_len, &use_include_path) == FAILURE) {
+ RETURN_FALSE;
+ }
if (!(data = php_tidy_file_to_mem(arg1, use_include_path, &data_len TSRMLS_CC))) {
RETURN_FALSE;
}
} else {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|Zsb", &arg1, &arg1_len, &config, &enc, &enc_len, &use_include_path) == FAILURE) {
+ RETURN_FALSE;
+ }
data = arg1;
data_len = arg1_len;
}