- Timestamp:
- 09/11/2025 02:45:56 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/wpBlockPatternsRegistry.php
r58176 r60729 663 663 $reflection = new ReflectionClass( $registry ); 664 664 $property = $reflection->getProperty( 'registered_patterns' ); 665 $property->setAccessible( true ); 665 if ( PHP_VERSION_ID < 80100 ) { 666 $property->setAccessible( true ); 667 } 666 668 667 669 // Get the value of the private property. 668 670 $registered_patterns = $property->getValue( $registry ); 669 $property->setAccessible( false ); 671 if ( PHP_VERSION_ID < 80100 ) { 672 $property->setAccessible( false ); 673 } 670 674 671 675 return $registered_patterns; … … 682 686 $reflection = new ReflectionClass( $registry ); 683 687 $property = $reflection->getProperty( 'registered_patterns' ); 684 $property->setAccessible( true ); 688 if ( PHP_VERSION_ID < 80100 ) { 689 $property->setAccessible( true ); 690 } 685 691 686 692 // Set the value of the private property. 687 693 $property->setValue( $registry, $value ); 688 $property->setAccessible( false ); 694 if ( PHP_VERSION_ID < 80100 ) { 695 $property->setAccessible( false ); 696 } 689 697 } 690 698 }
Note: See TracChangeset
for help on using the changeset viewer.