From 0f7ca11a70fadab56cd0e726025cc4e358990542 Mon Sep 17 00:00:00 2001 From: codinghuang <2812240764@qq.com> Date: Fri, 8 Jan 2021 15:45:44 +0800 Subject: [PATCH] zval_refcount_p can't get string refcount In php debug mode --- yasd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yasd.cc b/yasd.cc index 7370564..f66fc99 100644 --- a/yasd.cc +++ b/yasd.cc @@ -237,7 +237,7 @@ static PHP_FUNCTION(Yasd_Zval_getRefCount) { if (!Z_REFCOUNTED_P(zv) && !(Z_TYPE_P(zv) == IS_ARRAY) && !(Z_TYPE_P(zv) == IS_STRING)) { RETURN_NULL(); } - RETURN_LONG(zval_refcount_p(zv)); + RETURN_LONG(GC_REFCOUNT(Z_COUNTED_P(zv))); } // clang-format off