File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ public function get( $option_name ) {
5353 return intval ( $ persistent_data ->JETPACK_BLOG_ID ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
5454
5555 case 'master_user ' :
56- return $ this ->get_master_user_id ( $ persistent_data ->JETPACK_CONNECTION_OWNER_TOKEN ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
56+ $ token = $ persistent_data ->JETPACK_CONNECTION_OWNER_TOKEN ; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
57+ return $ token ? $ this ->get_master_user_id ( $ token ) : false ;
5758
5859 case 'user_tokens ' :
59- return $ this ->get_user_tokens ( $ persistent_data ->JETPACK_CONNECTION_OWNER_TOKEN ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
60+ $ token = $ persistent_data ->JETPACK_CONNECTION_OWNER_TOKEN ; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
61+ return $ token ? $ this ->get_user_tokens ( $ token ) : false ;
6062 }
6163
6264 return null ;
Original file line number Diff line number Diff line change @@ -26,9 +26,6 @@ class AtomicStorageProviderTest extends WP_UnitTestCase {
2626 public function set_up () {
2727 parent ::set_up ();
2828
29- // Reset mock data
30- Atomic_Persistent_Data::$ data = array ();
31-
3229 // Create provider instance
3330 $ this ->provider = new Atomic_Storage_Provider ();
3431
@@ -174,9 +171,6 @@ public function test_get_user_tokens_existing_matching() {
174171 $ user_id =
static ::
factory ()->
user ->
create (
array (
'user_email ' =>
'[email protected] ' ) );
175172 $ other_user_id =
static ::
factory ()->
user ->
create (
array (
'user_email ' =>
'[email protected] ' ) );
176173
177- // Set master_user directly in database
178- update_option ( 'master_user ' , $ user_id );
179-
180174 // Set existing tokens with other users
181175 $ existing_tokens = array (
182176 $ user_id => 'token.secret. ' . $ user_id ,
You can’t perform that action at this time.
0 commit comments