Skip to content

Commit

Permalink
Don't attempt to dereference the constant zval if it's not found
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Oct 18, 2015
1 parent d189d8c commit 557be55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xdebug_compat.c
Expand Up @@ -179,7 +179,9 @@ int xdebug_get_constant(char *val, int len, zval *const_val TSRMLS_DC)
zval *tmp_const = NULL;
tmp_const = zend_get_constant_str(val, len);

*const_val = *tmp_const;
if (tmp_const) {
*const_val = *tmp_const;
}

return tmp_const != NULL;
}
Expand Down

0 comments on commit 557be55

Please sign in to comment.