Skip to content

Commit 6468df0

Browse files
[%pS migration] Use %pS in ext/tidy
1 parent 89b22fa commit 6468df0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎ext/tidy/tidy.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ static bool php_tidy_set_tidy_opt(TidyDoc doc, const char *optname, zval *value,
768768
const zend_string *str = zval_get_tmp_string(value, &tmp_str);
769769
const bool result = tidyOptSetValue(doc, tidyOptGetId(opt), ZSTR_VAL(str));
770770
if (UNEXPECTED(!result)) {
771-
zend_argument_type_error(arg, "option \"%s\" does not accept \"%s\" as a value", optname, ZSTR_VAL(str));
771+
zend_argument_type_error(arg, "option \"%s\" does not accept \"%pS\" as a value", optname, str);
772772
}
773773
zend_tmp_string_release(tmp_str);
774774
return result;
@@ -792,7 +792,7 @@ static bool php_tidy_set_tidy_opt(TidyDoc doc, const char *optname, zval *value,
792792
} else {
793793
result = tidyOptSetValue(doc, tidyOptGetId(opt), ZSTR_VAL(str));
794794
if (UNEXPECTED(!result)) {
795-
zend_argument_type_error(arg, "option \"%s\" does not accept \"%s\" as a value", optname, ZSTR_VAL(str));
795+
zend_argument_type_error(arg, "option \"%s\" does not accept \"%pS\" as a value", optname, str);
796796
}
797797
}
798798
zend_tmp_string_release(tmp_str);
@@ -1106,7 +1106,7 @@ PHP_FUNCTION(tidy_parse_file)
11061106
ZEND_PARSE_PARAMETERS_END();
11071107

11081108
if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path))) {
1109-
php_error_docref(NULL, E_WARNING, "Cannot load \"%s\" into memory%s", ZSTR_VAL(inputfile), (use_include_path) ? " (using include path)" : "");
1109+
php_error_docref(NULL, E_WARNING, "Cannot load \"%pS\" into memory%s", inputfile, (use_include_path) ? " (using include path)" : "");
11101110
RETURN_FALSE;
11111111
}
11121112

@@ -1386,7 +1386,7 @@ PHP_METHOD(tidy, __construct)
13861386

13871387
if (inputfile) {
13881388
if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path))) {
1389-
zend_throw_error(zend_ce_exception, "Cannot load \"%s\" into memory%s", ZSTR_VAL(inputfile), (use_include_path) ? " (using include path)" : "");
1389+
zend_throw_error(zend_ce_exception, "Cannot load \"%pS\" into memory%s", inputfile, (use_include_path) ? " (using include path)" : "");
13901390
RETURN_THROWS();
13911391
}
13921392

@@ -1431,7 +1431,7 @@ PHP_METHOD(tidy, parseFile)
14311431
obj = Z_TIDY_P(ZEND_THIS);
14321432

14331433
if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path))) {
1434-
php_error_docref(NULL, E_WARNING, "Cannot load \"%s\" into memory%s", ZSTR_VAL(inputfile), (use_include_path) ? " (using include path)" : "");
1434+
php_error_docref(NULL, E_WARNING, "Cannot load \"%pS\" into memory%s", inputfile, (use_include_path) ? " (using include path)" : "");
14351435
RETURN_FALSE;
14361436
}
14371437

0 commit comments

Comments
 (0)