Skip to content

Commit

Permalink
fix compilation + fix on PHP < 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
iamluc committed Dec 19, 2024
1 parent f7968ee commit 46f596d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/exception_serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ void ddtrace_create_capture_value(zval *zv, struct ddog_CaptureValue *value, con
if (ce->type == ZEND_INTERNAL_CLASS) {
#if PHP_VERSION_ID < 70400
if (is_temp) {
zend_array_release(ht);
zend_hash_next_index_insert_ptr(&DDTRACE_G(debugger_capture_ephemerals), ht);
}
#else
zend_hash_next_index_insert_ptr(&DDTRACE_G(debugger_capture_ephemerals), ht);
Expand Down
5 changes: 5 additions & 0 deletions ext/live_debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,12 @@ ddog_LiveDebuggerSetup ddtrace_live_debugger_setup = {

static void dd_ht_ephemerals_dtor(void *pData) {
HashTable *ht = *((HashTable **)pData);

#if PHP_VERSION_ID < 70400
zend_array_release(ht);
#else
zend_release_properties(ht);
#endif
}

void ddtrace_live_debugger_minit(void) {
Expand Down

0 comments on commit 46f596d

Please sign in to comment.