Skip to content

Commit ac42cce

Browse files
committed
Try to make the inbox messages setting safer
1 parent a41b3e7 commit ac42cce

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

classes/controllers/FrmOnboardingWizardController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,17 @@ public static function mark_onboarding_as_skipped() {
461461
*
462462
* @since 6.9
463463
*
464-
* @param array $inbox_messages The array of existing inbox messages.
464+
* @param mixed $inbox_messages The inbox option data.
465465
*
466466
* @return array Configuration for the onboarding wizard slide-in notification.
467467
*/
468468
public static function add_wizard_to_floating_links( $inbox_messages ) {
469469
$message = __( 'Welcome to Formidable Forms! Click here to run the Onboarding Wizard and it will guide you through the basic settings and get you started in 2 minutes.', 'formidable' );
470470

471+
if ( ! is_array( $inbox_messages ) ) {
472+
$inbox_messages = array();
473+
}
474+
471475
$inbox_messages['onboarding_wizard'] = array(
472476
'subject' => esc_html__( 'Begin With Ease!', 'formidable' ),
473477
'message' => esc_html( $message ),

0 commit comments

Comments
 (0)