diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index b87f9578b215..194df093318c 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -159,7 +159,7 @@ static zval *xsl_objects_write_property_with_validation(zend_object *object, zen /* Validate value *after* coercions have been performed, and restore the old value if necessary. */ if (UNEXPECTED(Z_LVAL_P(property) < 0)) { Z_LVAL_P(property) = old_property_value; - zend_value_error("%s::$%s must be greater than or equal to 0", ZSTR_VAL(object->ce->name), ZSTR_VAL(member)); + zend_value_error("%pS::$%pS must be greater than or equal to 0", object->ce->name, member); return &EG(error_zval); } @@ -198,7 +198,7 @@ static zval *xsl_objects_read_property(zend_object *object, zend_string *member, { /* read handler is being called as a fallback after get_property_ptr_ptr returned NULL */ if (type != BP_VAR_IS && type != BP_VAR_R && xsl_is_validated_property(member)) { - zend_throw_error(NULL, "Indirect modification of %s::$%s is not allowed", ZSTR_VAL(object->ce->name), ZSTR_VAL(member)); + zend_throw_error(NULL, "Indirect modification of %pS::$%pS is not allowed", object->ce->name, member); return &EG(uninitialized_zval); } @@ -208,7 +208,7 @@ static zval *xsl_objects_read_property(zend_object *object, zend_string *member, static void xsl_objects_unset_property(zend_object *object, zend_string *member, void **cache_slot) { if (xsl_is_validated_property(member)) { - zend_throw_error(NULL, "Cannot unset %s::$%s", ZSTR_VAL(object->ce->name), ZSTR_VAL(member)); + zend_throw_error(NULL, "Cannot unset %pS::$%pS", object->ce->name, member); return; } diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 230c7bd39cc2..62ae368efacb 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -36,7 +36,7 @@ static zend_result php_xsl_xslt_apply_params(xsltTransformContextPtr ctxt, HashT int result = xsltQuoteOneUserParam(ctxt, (const xmlChar *) ZSTR_VAL(string_key), (const xmlChar *) Z_STRVAL_P(value)); if (result < 0) { - php_error_docref(NULL, E_WARNING, "Could not apply parameter \"%s\"", ZSTR_VAL(string_key)); + php_error_docref(NULL, E_WARNING, "Could not apply parameter \"%pS\"", string_key); return FAILURE; } } ZEND_HASH_FOREACH_END(); @@ -307,8 +307,8 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl if (style == NULL) { zend_string *name = get_active_function_or_method_name(); - zend_throw_error(NULL, "%s() can only be called after a stylesheet has been imported", - ZSTR_VAL(name)); + zend_throw_error(NULL, "%pS() can only be called after a stylesheet has been imported", + name); zend_string_release(name); return NULL; } @@ -454,8 +454,8 @@ PHP_METHOD(XSLTProcessor, transformToDoc) if (!instanceof_function(ret_class, current_ce)) { xmlFreeDoc(newdocp); - zend_argument_type_error(2, "must be a class name compatible with %s, %s given", - ZSTR_VAL(current_class_name), ZSTR_VAL(ret_class->name) + zend_argument_type_error(2, "must be a class name compatible with %pS, %pS given", + current_class_name, ret_class->name ); RETURN_THROWS(); }