Skip to content

Commit

Permalink
back to dev
Browse files Browse the repository at this point in the history
#32 fix for PHP 7.4
  • Loading branch information
longxinH committed Dec 5, 2019
1 parent 613a88e commit 6bfef69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion extension/php_xhprof.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern zend_module_entry xhprof_module_entry;
*/

/* XHProf version */
#define XHPROF_VERSION "2.1.1"
#define XHPROF_VERSION "2.1.2-dev"

/* Fictitious function name to represent top of the call tree. The paranthesis
* in the name is to ensure we don't conflict with user function names. */
Expand Down
5 changes: 5 additions & 0 deletions extension/xhprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,13 @@ zend_string *hp_pcre_match(char *pattern, int len, zval *data, zend_ulong idx)
ZVAL_NULL(&rsubparts);
subparts = &rsubparts;

#if PHP_VERSION_ID < 70400
php_pcre_match_impl(pce_regexp, Z_STRVAL_P(data), Z_STRLEN_P(data), &matches, subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
#else
php_pcre_match_impl(pce_regexp, Z_STR_P(data), &matches, subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
#endif

if (zend_hash_num_elements(Z_ARRVAL_P(subparts))) {
match = zend_hash_index_find(Z_ARRVAL_P(subparts), idx);
Expand Down

0 comments on commit 6bfef69

Please sign in to comment.