@@ -393,7 +393,7 @@ void hp_ignored_functions_clear(hp_ignored_functions *functions)
393
393
hp_array_del (functions -> names );
394
394
functions -> names = NULL ;
395
395
396
- memset (functions -> filter , 0 , XHPROF_MAX_IGNORED_FUNCTIONS );
396
+ memset (functions -> filter , 0 , sizeof ( functions -> filter ) );
397
397
efree (functions );
398
398
}
399
399
@@ -425,7 +425,6 @@ hp_ignored_functions *hp_ignored_functions_init(zval *values)
425
425
426
426
if (Z_TYPE_P (values ) == IS_ARRAY ) {
427
427
HashTable * ht ;
428
- zend_ulong num_key ;
429
428
zend_string * key ;
430
429
zval * val ;
431
430
@@ -434,7 +433,7 @@ hp_ignored_functions *hp_ignored_functions_init(zval *values)
434
433
435
434
names = ecalloc (count + 1 , sizeof (zend_string * ));
436
435
437
- ZEND_HASH_FOREACH_KEY_VAL (ht , num_key , key , val ) {
436
+ ZEND_HASH_FOREACH_STR_KEY_VAL (ht , key , val ) {
438
437
if (!key ) {
439
438
if (Z_TYPE_P (val ) == IS_STRING && strcmp (Z_STRVAL_P (val ), ROOT_SYMBOL ) != 0 ) {
440
439
/* do not ignore "main" */
@@ -457,7 +456,7 @@ hp_ignored_functions *hp_ignored_functions_init(zval *values)
457
456
functions = emalloc (sizeof (hp_ignored_functions ));
458
457
functions -> names = names ;
459
458
460
- memset (functions -> filter , 0 , XHPROF_MAX_IGNORED_FUNCTIONS );
459
+ memset (functions -> filter , 0 , sizeof ( functions -> filter ) );
461
460
462
461
uint32_t i = 0 ;
463
462
for (; names [i ] != NULL ; i ++ ) {
@@ -1274,7 +1273,6 @@ static inline void hp_array_del(zend_string **names)
1274
1273
1275
1274
int hp_pcre_match (zend_string * pattern , const char * str , size_t len , zend_ulong idx )
1276
1275
{
1277
- zval * match ;
1278
1276
pcre_cache_entry * pce_regexp ;
1279
1277
1280
1278
if ((pce_regexp = pcre_get_compiled_regex_cache (pattern )) == NULL ) {
@@ -1287,7 +1285,7 @@ int hp_pcre_match(zend_string *pattern, const char *str, size_t len, zend_ulong
1287
1285
#if PHP_VERSION_ID < 70400
1288
1286
php_pcre_match_impl (pce_regexp , (char * )str , len , & matches , & subparts /* subpats */ ,
1289
1287
0 /* global */ , 0 /* ZEND_NUM_ARGS() >= 4 */ , 0 /*flags PREG_OFFSET_CAPTURE*/ , 0 /* start_offset */ );
1290
- #else
1288
+ #elif PHP_VERSION_ID < 80400
1291
1289
zend_string * tmp = zend_string_init (str , len , 0 );
1292
1290
php_pcre_match_impl (pce_regexp , tmp , & matches , & subparts /* subpats */ ,
1293
1291
0 /* global */ ,
@@ -1296,6 +1294,11 @@ int hp_pcre_match(zend_string *pattern, const char *str, size_t len, zend_ulong
1296
1294
#endif
1297
1295
0 /*flags PREG_OFFSET_CAPTURE*/ , 0 /* start_offset */ );
1298
1296
zend_string_release (tmp );
1297
+ #else
1298
+ zend_string * tmp = zend_string_init (str , len , 0 );
1299
+ php_pcre_match_impl (pce_regexp , tmp , & matches , & subparts /* subpats */ ,
1300
+ false/* global */ , 0 /*flags PREG_OFFSET_CAPTURE*/ , 0 /* start_offset */ );
1301
+ zend_string_release (tmp );
1299
1302
#endif
1300
1303
1301
1304
if (!zend_hash_num_elements (Z_ARRVAL (subparts ))) {
@@ -1352,15 +1355,14 @@ zend_string *hp_trace_callback_pdo_statement_execute(zend_string *symbol, zend_e
1352
1355
{
1353
1356
zend_string * result = NULL ;
1354
1357
zend_string * pattern = NULL ;
1355
- zend_class_entry * pdo_ce ;
1356
1358
zval * object = (data -> This .value .obj ) ? & (data -> This ) : NULL ;
1357
1359
zval * query_string , * arg ;
1358
1360
1359
1361
if (object != NULL ) {
1360
1362
#if PHP_VERSION_ID < 80000
1361
- query_string = zend_read_property (pdo_ce , object , "queryString" , sizeof ("queryString" ) - 1 , 0 , NULL );
1363
+ query_string = zend_read_property (NULL , object , "queryString" , sizeof ("queryString" ) - 1 , 0 , NULL );
1362
1364
#else
1363
- query_string = zend_read_property (pdo_ce , Z_OBJ_P (object ), "queryString" , sizeof ("queryString" ) - 1 , 0 , NULL );
1365
+ query_string = zend_read_property (NULL , Z_OBJ_P (object ), "queryString" , sizeof ("queryString" ) - 1 , 0 , NULL );
1364
1366
#endif
1365
1367
1366
1368
if (query_string == NULL || Z_TYPE_P (query_string ) != IS_STRING ) {
0 commit comments