@@ -364,13 +364,6 @@ static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *c
364
364
return (uintptr_t )CACHED_PTR_EX (cache_slot + 1 );
365
365
}
366
366
367
- if (UNEXPECTED (ZSTR_VAL (member )[0 ] == '\0' && ZSTR_LEN (member ) != 0 )) {
368
- if (!silent ) {
369
- zend_throw_error (NULL , "Cannot access property started with '\\0'" );
370
- }
371
- return ZEND_WRONG_PROPERTY_OFFSET ;
372
- }
373
-
374
367
if (UNEXPECTED (zend_hash_num_elements (& ce -> properties_info ) == 0 )) {
375
368
goto exit_dynamic ;
376
369
}
@@ -418,6 +411,12 @@ static zend_always_inline uintptr_t zend_get_property_offset(zend_class_entry *c
418
411
}
419
412
} else if (UNEXPECTED (property_info == NULL )) {
420
413
exit_dynamic :
414
+ if (UNEXPECTED (ZSTR_VAL (member )[0 ] == '\0' && ZSTR_LEN (member ) != 0 )) {
415
+ if (!silent ) {
416
+ zend_throw_error (NULL , "Cannot access property started with '\\0'" );
417
+ }
418
+ return ZEND_WRONG_PROPERTY_OFFSET ;
419
+ }
421
420
if (cache_slot ) {
422
421
CACHE_POLYMORPHIC_PTR_EX (cache_slot , ce , (void * )ZEND_DYNAMIC_PROPERTY_OFFSET );
423
422
}
@@ -445,13 +444,6 @@ ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_s
445
444
uint32_t flags ;
446
445
zend_class_entry * scope ;
447
446
448
- if (UNEXPECTED (ZSTR_VAL (member )[0 ] == '\0' && ZSTR_LEN (member ) != 0 )) {
449
- if (!silent ) {
450
- zend_throw_error (NULL , "Cannot access property started with '\\0'" );
451
- }
452
- return ZEND_WRONG_PROPERTY_INFO ;
453
- }
454
-
455
447
if (UNEXPECTED (zend_hash_num_elements (& ce -> properties_info ) == 0 )) {
456
448
goto exit_dynamic ;
457
449
}
@@ -495,6 +487,12 @@ ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_s
495
487
property_info = (zend_property_info * )Z_PTR_P (zv );
496
488
} else if (UNEXPECTED (property_info == NULL )) {
497
489
exit_dynamic :
490
+ if (UNEXPECTED (ZSTR_VAL (member )[0 ] == '\0' && ZSTR_LEN (member ) != 0 )) {
491
+ if (!silent ) {
492
+ zend_throw_error (NULL , "Cannot access property started with '\\0'" );
493
+ }
494
+ return ZEND_WRONG_PROPERTY_INFO ;
495
+ }
498
496
return NULL ;
499
497
} else if (UNEXPECTED (property_info == ZEND_WRONG_PROPERTY_INFO )) {
500
498
/* Information was available, but we were denied access. Error out. */
0 commit comments