Make WordPress Core

Ticket #45438: 45438.2.patch

File 45438.2.patch, 888 bytes (added by ishitaka, 6 years ago)
  • src/wp-admin/options.php

     
    222222                if ( is_multisite() && ! current_user_can( 'manage_network_options' ) ) {
    223223                        wp_die( __( 'Sorry, you are not allowed to modify unregistered settings for this site.' ) );
    224224                }
    225                 $options = explode( ',', wp_unslash( $_POST['page_options'] ) );
     225                $options = isset( $_POST['page_options'] ) ? explode( ',', wp_unslash( $_POST[ 'page_options' ] ) ) : null;
    226226        } else {
    227227                $options = $whitelist_options[ $option_page ];
    228228        }
     
    293293                if ( $user_language_old !== $user_language_new ) {
    294294                        load_default_textdomain( $user_language_new );
    295295                }
     296        } else {
     297                add_settings_error( 'general', 'settings_updated', __( 'Settings save failed.' ), 'error' );
    296298        }
    297299
    298300        /**