Skip to content

Commit

Permalink
Fix [-Wmaybe-uninitialized] warning
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Jul 5, 2024
1 parent f8f4d0c commit aff62dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,15 +1351,14 @@ zend_string *hp_trace_callback_pdo_statement_execute(zend_string *symbol, zend_e
{
zend_string *result = NULL;
zend_string *pattern = NULL;
zend_class_entry *pdo_ce;
zval *object = (data->This.value.obj) ? &(data->This) : NULL;
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);
query_string = zend_read_property(NULL, 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);
query_string = zend_read_property(NULL, Z_OBJ_P(object), "queryString", sizeof("queryString") - 1, 0, NULL);
#endif

if (query_string == NULL || Z_TYPE_P(query_string) != IS_STRING) {
Expand Down

0 comments on commit aff62dc

Please sign in to comment.