Skip to content

Commit

Permalink
Merge pull request phacility#45 from andypost/patch-1
Browse files Browse the repository at this point in the history
Tested with PHP 8 beta3
  • Loading branch information
longxinH authored Sep 7, 2020
2 parents 79597c0 + 359f847 commit 799fcd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This version supports PHP7
- 7.2
- 7.3
- 7.4
- 8.0beta2
- 8.0beta3

# Installation
```
Expand Down
6 changes: 5 additions & 1 deletion extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,11 @@ zend_string *hp_trace_callback_pdo_statement_execute(zend_string *symbol, zend_e
zval *query_string, *arg;

if (object != NULL) {
#if PHP_VERSION_ID < 80000
query_string = zend_read_property(pdo_ce, object, "queryString", sizeof("queryString") - 1, 0, NULL);
#else
query_string = zend_read_property(pdo_ce, Z_OBJ_P(object), "queryString", sizeof("queryString") - 1, 0, NULL);
#endif

if (query_string == NULL || Z_TYPE_P(query_string) != IS_STRING) {
result = strpprintf(0, "%s", ZSTR_VAL(symbol));
Expand Down Expand Up @@ -1556,7 +1560,7 @@ zend_string *hp_trace_callback_curl_exec(zend_string *symbol, zend_execute_data

zval_ptr_dtor(&func);
zval_ptr_dtor(&retval);
zval_ptr_dtor(&params);
zval_ptr_dtor(&params[0]);

return result;
}
Expand Down

0 comments on commit 799fcd7

Please sign in to comment.