Skip to content

Commit 016a96c

Browse files
committed
Fix ::jsonSerialize() failure message
1 parent c4ab08a commit 016a96c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/json/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static void json_encode_serializable_object(smart_str *buf, zval *val, int optio
571571
ZVAL_STRING(&fname, "jsonSerialize");
572572

573573
if (FAILURE == call_user_function_ex(EG(function_table), val, &fname, &retval, 0, NULL, 1, NULL TSRMLS_CC) || Z_TYPE(retval) == IS_UNDEF) {
574-
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Failed calling %s::jsonSerialize()", ce->name);
574+
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Failed calling %s::jsonSerialize()", ce->name->val);
575575
smart_str_appendl(buf, "null", sizeof("null") - 1);
576576
zval_ptr_dtor(&fname);
577577
return;

0 commit comments

Comments
 (0)