Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wrong title and icon for login widget #385

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

joshcanhelp
Copy link
Contributor

Swapped in array_replace_recursive instead of array_merge_recursive to avoid an array being created that the Lock widget couldn't understand.

@joshcanhelp joshcanhelp added this to the v3-Next milestone Jan 29, 2018
Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questions

@@ -254,8 +254,7 @@ public function get_lock_options() {
$extraOptions["auth"]["redirectUrl"] = $this->get_code_callback_url();
}

$options_obj = array_merge_recursive( $extraOptions, $options_obj );
$options_obj = array_merge_recursive( $options_obj , $extended_settings );
$options_obj = array_replace_recursive( $extraOptions, $options_obj, $extended_settings );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what is the logic here for duplicate entries. extraOptions are over ridden by options_obj but this can then be over ridden by extended_settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cocojoe - Correct.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the naming seems odd. However, it is the same order as the original so fair enough

@@ -230,8 +230,7 @@ public function get_lock_options() {
$extraOptions["callbackURL"] = $this->get_code_callback_url();
}

$options_obj = array_merge( $extraOptions, $options_obj );
$options_obj = array_merge( $options_obj , $extended_settings );
$options_obj = array_merge( $extraOptions, $options_obj, $extended_settings );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the previous snippet you change merge to replace why does this one stay as merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cocojoe - Array dimensions, recursive vs. not recursive. array_merge_recursive can create arrays out of strings, whereas array_replace_recursive overrides. array_merge also overrides but it only goes 1 level deep. Looks like the options arrays are built differently.

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of questions

@joshcanhelp
Copy link
Contributor Author

@cocojoe - Ready for re-review

@joshcanhelp joshcanhelp merged commit aed2c0e into dev Jan 31, 2018
@joshcanhelp joshcanhelp deleted the fixed-widget-wrong-title-icon branch January 31, 2018 15:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants