Skip to content

Commit db3746e

Browse files
committed
Guard setAccessible()
1 parent f83467c commit db3746e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/phpunit/tests/rest-api/rest-sync-server.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public function set_up() {
3030

3131
// Reset storage post ID cache to ensure clean state after transaction rollback.
3232
$reflection = new ReflectionProperty( 'WP_Sync_Post_Meta_Storage', 'storage_post_id' );
33-
$reflection->setAccessible( true );
33+
if ( PHP_VERSION_ID < 80100 ) {
34+
$reflection->setAccessible( true );
35+
}
3436
$reflection->setValue( null, null );
3537
}
3638

0 commit comments

Comments
 (0)