Skip to content
2 changes: 1 addition & 1 deletion ext/dom/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ static void dom_document_register_node_class(INTERNAL_FUNCTION_PARAMETERS, bool
return;
}

zend_argument_error(NULL, 2, "must be a class name derived from %s or null, %s given", ZSTR_VAL(basece->name), ZSTR_VAL(ce->name));
zend_argument_error(NULL, 2, "must be a class name derived from %pS or null, %pS given", basece->name, ce->name);
RETURN_THROWS();
}

Expand Down
2 changes: 1 addition & 1 deletion ext/dom/html_collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ PHP_METHOD(Dom_HTMLCollection, namedItem)
zval *dom_html_collection_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}

Expand Down
6 changes: 3 additions & 3 deletions ext/dom/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -2652,22 +2652,22 @@ PHP_METHOD(Dom_Node, compareDocumentPosition)

PHP_METHOD(Dom_Node, __construct)
{
zend_throw_error(NULL, "Cannot directly construct %s, use document methods instead", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
zend_throw_error(NULL, "Cannot directly construct %pS, use document methods instead", Z_OBJCE_P(ZEND_THIS)->name);
}

PHP_METHOD(DOMNode, __sleep)
{
ZEND_PARSE_PARAMETERS_NONE();

zend_throw_exception_ex(NULL, 0, "Serialization of '%s' is not allowed, unless serialization methods are implemented in a subclass", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
zend_throw_exception_ex(NULL, 0, "Serialization of '%pS' is not allowed, unless serialization methods are implemented in a subclass", Z_OBJCE_P(ZEND_THIS)->name);
RETURN_THROWS();
}

PHP_METHOD(DOMNode, __wakeup)
{
ZEND_PARSE_PARAMETERS_NONE();

zend_throw_exception_ex(NULL, 0, "Unserialization of '%s' is not allowed, unless unserialization methods are implemented in a subclass", ZSTR_VAL(Z_OBJCE_P(ZEND_THIS)->name));
zend_throw_exception_ex(NULL, 0, "Unserialization of '%pS' is not allowed, unless unserialization methods are implemented in a subclass", Z_OBJCE_P(ZEND_THIS)->name);
RETURN_THROWS();
}

Expand Down
2 changes: 1 addition & 1 deletion ext/dom/nodelist.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ dom_nodelist_dimension_index dom_modern_nodelist_get_index(const zval *offset)
zval *dom_modern_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}

Expand Down
4 changes: 2 additions & 2 deletions ext/dom/parentnode/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static zend_result dom_sanity_check_node_list_types(zval *nodes, uint32_t nodesc
const zend_class_entry *ce = Z_OBJCE(nodes[i]);

if (!instanceof_function(ce, node_ce)) {
zend_argument_type_error(i + 1, "must be of type %s|string, %s given", ZSTR_VAL(node_ce->name), zend_zval_type_name(&nodes[i]));
zend_argument_type_error(i + 1, "must be of type %pS|string, %s given", node_ce->name, zend_zval_type_name(&nodes[i]));
return FAILURE;
}
} else if (type == IS_STRING) {
Expand All @@ -474,7 +474,7 @@ static zend_result dom_sanity_check_node_list_types(zval *nodes, uint32_t nodesc
return FAILURE;
}
} else {
zend_argument_type_error(i + 1, "must be of type %s|string, %s given", ZSTR_VAL(node_ce->name), zend_zval_type_name(&nodes[i]));
zend_argument_type_error(i + 1, "must be of type %pS|string, %s given", node_ce->name, zend_zval_type_name(&nodes[i]));
return FAILURE;
}
}
Expand Down
8 changes: 4 additions & 4 deletions ext/dom/php_dom.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static void dom_unset_property(zend_object *object, zend_string *member, void **
dom_object *obj = php_dom_obj_from_obj(object);

if (obj->prop_handler != NULL && zend_hash_exists(obj->prop_handler, 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;
}

Expand Down Expand Up @@ -2308,7 +2308,7 @@ static bool dom_nodemap_or_nodelist_process_offset_as_named(zval *offset, zend_l
static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
zend_throw_error(NULL, "Cannot access %s without offset", ZSTR_VAL(object->ce->name));
zend_throw_error(NULL, "Cannot access %pS without offset", object->ce->name);
return NULL;
}

Expand Down Expand Up @@ -2400,7 +2400,7 @@ void php_dom_get_content_into_zval(const xmlNode *nodep, zval *return_value, boo
static zval *dom_nodemap_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
zend_throw_error(NULL, "Cannot access %s without offset", ZSTR_VAL(object->ce->name));
zend_throw_error(NULL, "Cannot access %pS without offset", object->ce->name);
return NULL;
}

Expand Down Expand Up @@ -2444,7 +2444,7 @@ static int dom_nodemap_has_dimension(zend_object *object, zval *member, int chec
static zval *dom_modern_nodemap_read_dimension(zend_object *object, zval *offset, int type, zval *rv)
{
if (UNEXPECTED(!offset)) {
zend_throw_error(NULL, "Cannot append to %s", ZSTR_VAL(object->ce->name));
zend_throw_error(NULL, "Cannot append to %pS", object->ce->name);
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/dom/php_dom.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ xmlNodePtr dom_nodelist_iter_start_first_child(xmlNodePtr nodep);
#define DOM_GET_INTERN(__id, __intern) { \
__intern = Z_DOMOBJ_P(__id); \
if (UNEXPECTED(__intern->ptr == NULL)) { \
zend_throw_error(NULL, "Couldn't fetch %s", ZSTR_VAL(__intern->std.ce->name));\
zend_throw_error(NULL, "Couldn't fetch %pS", __intern->std.ce->name);\
RETURN_THROWS();\
} \
}
Expand Down
4 changes: 2 additions & 2 deletions ext/dom/xml_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ PHP_DOM_EXPORT xmlNodePtr dom_object_get_node(dom_object *obj);
#define NODE_GET_OBJ(__ptr, __id, __prtype, __intern) { \
__intern = Z_LIBXML_NODE_P(__id); \
if (UNEXPECTED(__intern->node == NULL)) { \
php_error_docref(NULL, E_WARNING, "Couldn't fetch %s", \
ZSTR_VAL(Z_OBJCE_P(__zv)->name));\
php_error_docref(NULL, E_WARNING, "Couldn't fetch %pS", \
Z_OBJCE_P(__zv)->name);\
RETURN_NULL();\
} \
__ptr = (__prtype)__intern->node->node; \
Expand Down
Loading