-
Notifications
You must be signed in to change notification settings - Fork 49
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
fix: wizards - update type check conditional for custom_logo
#3442
Conversation
@@ -520,7 +520,7 @@ public function api_update_theme_with_mods( $request ) { | |||
continue; | |||
} | |||
|
|||
if ( null !== $value && in_array( $key, $this->media_theme_mods ) ) { | |||
if ( '' !== $value && in_array( $key, $this->media_theme_mods ) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if $value
needs to be an array there, what about a more explicit check like ! empty( $value['id'] )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. I have updated with your recommendation 22c742a
# [5.4.0-alpha.7](v5.4.0-alpha.6...v5.4.0-alpha.7) (2024-09-20) ### Bug Fixes * wizards - update type check conditional for `custom_logo` ([#3442](#3442)) ([125f756](125f756))
🎉 This PR is included in version 5.4.0-alpha.7 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Changes introduced in #3433 produced a bug relating to how
custom_logo
andnewspack_footer_logo
theme mods are saved.PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string
This PR fixes this issue by correctly testing incoming values by the correct type.
How to test the changes in this Pull Request:
git checkout origin/fix/wizard-custom-logo-save
Other information: