diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-09-22 16:28:42 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-09-22 16:28:42 +0200 |
commit | 5356bad8c66d9df437c5136d02f6654a5b56b2b9 (patch) | |
tree | 1972e9b0b236fe9895522cab78a8ba52f0391973 /ext | |
parent | 7f36328bf0e8073f757ff005c3b49c909af7d145 (diff) | |
download | php-git-5356bad8c66d9df437c5136d02f6654a5b56b2b9.tar.gz |
Remove unused parameter
The `$use_include_path` parameter doesn't make sense for
`tidy_repair_string()`, and actually unused, so we remove it.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tidy/tests/019.phpt | 6 | ||||
-rw-r--r-- | ext/tidy/tidy.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/ext/tidy/tests/019.phpt b/ext/tidy/tests/019.phpt index dae23127b5..425b42889d 100644 --- a/ext/tidy/tests/019.phpt +++ b/ext/tidy/tests/019.phpt @@ -8,9 +8,9 @@ tidy_repair_*() and invalid parameters $l = 1; $s = ""; -tidy_repair_string($s, $l, $l, $l); -tidy_repair_string($s, $s, $s, $s); -tidy_repair_string($l, $l, $l ,$l); +tidy_repair_string($s, $l, $l); +tidy_repair_string($s, $s, $s); +tidy_repair_string($l, $l, $l); tidy_repair_file($s, $l, $l, $l); tidy_repair_file($s, $s, $s, $s); diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index d720cd7ce1..2860c31752 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -452,13 +452,14 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil { char *enc = NULL; size_t enc_len = 0; - zend_bool use_include_path = 0; TidyDoc doc; TidyBuffer *errbuf; zend_string *data, *arg1; zval *config = NULL; if (is_file) { + zend_bool use_include_path = 0; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|zsb", &arg1, &config, &enc, &enc_len, &use_include_path) == FAILURE) { RETURN_FALSE; } @@ -466,7 +467,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil RETURN_FALSE; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|zsb", &arg1, &config, &enc, &enc_len, &use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|zs", &arg1, &config, &enc, &enc_len) == FAILURE) { RETURN_FALSE; } data = arg1; |