From ecc49f6e398917f984711274d55c22b2a8fe999e Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Sat, 8 Aug 2026 17:55:40 -0700 Subject: [PATCH] [`%pS` migration] Use `%pS` in ext/random --- ext/random/engine_mt19937.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ext/random/engine_mt19937.c b/ext/random/engine_mt19937.c index a84fb9585c80..a1fba4b8367c 100644 --- a/ext/random/engine_mt19937.c +++ b/ext/random/engine_mt19937.c @@ -348,30 +348,30 @@ PHP_METHOD(Random_Engine_Mt19937, __unserialize) /* Verify the expected number of elements, this implicitly ensures that no additional elements are present. */ if (zend_hash_num_elements(d) != 2) { - zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(engine->std.ce->name)); + zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", engine->std.ce->name); RETURN_THROWS(); } /* members */ t = zend_hash_index_find(d, 0); if (!t || Z_TYPE_P(t) != IS_ARRAY) { - zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(engine->std.ce->name)); + zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", engine->std.ce->name); RETURN_THROWS(); } object_properties_load(&engine->std, Z_ARRVAL_P(t)); if (EG(exception)) { - zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(engine->std.ce->name)); + zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", engine->std.ce->name); RETURN_THROWS(); } /* state */ t = zend_hash_index_find(d, 1); if (!t || Z_TYPE_P(t) != IS_ARRAY) { - zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(engine->std.ce->name)); + zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", engine->std.ce->name); RETURN_THROWS(); } if (!engine->engine.algo->unserialize(engine->engine.state, Z_ARRVAL_P(t))) { - zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %s object", ZSTR_VAL(engine->std.ce->name)); + zend_throw_exception_ex(NULL, 0, "Invalid serialization data for %pS object", engine->std.ce->name); RETURN_THROWS(); } }