Skip to content

Commit

Permalink
[not verified] Defensive Coding: Ensure value is an array (#13919)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Nov 1, 2019
1 parent ead2569 commit 9f30a58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions _inc/lib/class.jetpack-keyring-service-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ private function __construct() {
*/
public static function add_sharing_menu() {
global $submenu;

if ( ! is_array( $submenu['options-general.php'] ) ) {
return;
}

$general_settings_names = array_map(
function ( $menu ) {
return array_values( $menu )[0];
Expand Down

0 comments on commit 9f30a58

Please sign in to comment.