diff --git a/extension/tests/xhprof_012.phpt b/extension/tests/xhprof_012.phpt index 85112279..adc1910e 100644 --- a/extension/tests/xhprof_012.phpt +++ b/extension/tests/xhprof_012.phpt @@ -3,7 +3,6 @@ XHProf: Test Curl Additional Info Author: longxinhui --SKIPIF-- -= 80000) echo "skip test for php >= 8"; ?> --INI-- xhprof.collect_additional_info = 1 --FILE-- diff --git a/extension/tests/xhprof_012_8.phpt b/extension/tests/xhprof_012_8.phpt deleted file mode 100644 index 460795cb..00000000 --- a/extension/tests/xhprof_012_8.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -XHProf: Test Curl Additional Info -Author: longxinhui ---SKIPIF-- - - ---INI-- -xhprof.collect_additional_info = 1 ---FILE-- - ---EXPECTF-- -main() : ct= 1; wt=*; -main()==>curl_close : ct= 1; wt=*; -main()==>curl_exec : ct= 1; wt=*; -main()==>curl_init : ct= 1; wt=*; -main()==>curl_setopt : ct= 2; wt=*; -main()==>xhprof_disable : ct= 1; wt=*; diff --git a/extension/xhprof.c b/extension/xhprof.c index e415278c..b8ab3624 100755 --- a/extension/xhprof.c +++ b/extension/xhprof.c @@ -1516,7 +1516,11 @@ zend_string *hp_trace_callback_curl_exec(zend_string *symbol, zend_execute_data zval func, retval, *option; zval *arg = ZEND_CALL_ARG(data, 1); +#if PHP_VERSION_ID < 80000 if (arg == NULL || Z_TYPE_P(arg) != IS_RESOURCE) { +#else + if (arg == NULL || Z_TYPE_P(arg) != IS_OBJECT) { +#endif return symbol; }