Skip to content

Commit 620cd69

Browse files
[%pS migration] Use %pS in ext/bcmath (#23147)
1 parent 89b22fa commit 620cd69

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎ext/bcmath/bcmath.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ static zval *bcmath_number_write_property(zend_object *obj, zend_string *name, z
971971
static void bcmath_number_unset_property(zend_object *obj, zend_string *name, void **cache_slot)
972972
{
973973
if (zend_string_equals(name, ZSTR_KNOWN(ZEND_STR_VALUE)) || zend_string_equals_literal(name, "scale")) {
974-
zend_throw_error(NULL, "Cannot unset readonly property %s::$%s", ZSTR_VAL(obj->ce->name), ZSTR_VAL(name));
974+
zend_throw_error(NULL, "Cannot unset readonly property %pS::$%pS", obj->ce->name, name);
975975
return;
976976
}
977977

@@ -1406,8 +1406,8 @@ static int bcmath_number_compare(zval *op1, zval *op2)
14061406
Z_PARAM_PROLOGUE(0, 0); \
14071407
if (UNEXPECTED(!(zend_parse_arg_obj(_arg, &(dest_obj), ce, 0) || \
14081408
zend_parse_arg_str_or_long(_arg, &(dest_str), &(dest_long), &_dummy, 0, _i)))) { \
1409-
zend_argument_type_error(_i, "must be of type int, string, or %s, %s given", \
1410-
ZSTR_VAL(bcmath_number_ce->name), zend_zval_value_name(_arg)); \
1409+
zend_argument_type_error(_i, "must be of type int, string, or %pS, %s given", \
1410+
bcmath_number_ce->name, zend_zval_value_name(_arg)); \
14111411
_error_code = ZPP_ERROR_FAILURE; \
14121412
break; \
14131413
}
@@ -1900,7 +1900,7 @@ PHP_METHOD(BcMath_Number, __unserialize)
19001900
return;
19011901

19021902
fail:
1903-
zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(bcmath_number_ce->name));
1903+
zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", bcmath_number_ce->name);
19041904
RETURN_THROWS();
19051905
}
19061906

0 commit comments

Comments
 (0)