Title: Fatal error before MAJ
Last modified: January 14, 2025

---

# Fatal error before MAJ

 *  Resolved [melinach](https://wordpress.org/support/users/melinach/)
 * (@melinach)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/)
 * I’ve just updated my site and since then Ultime Member no longer works and displays
   this error message:
 * **Fatal error**: Uncaught Error: Cannot access private property um\core\Options::
   $options in /home/lesmoustvg/www/wp-content/themes/Divi-Community/functions.php:
   89 Stack trace: #0 /home/lesmoustvg/www/wp-includes/class-wp-hook.php(324): custom_email_notifications_profile_is_updated(
   Array) #1 /home/lesmoustvg/www/wp-includes/plugin.php(205): WP_Hook->apply_filters(
   Array, Array) #2 /home/lesmoustvg/www/wp-content/plugins/ultimate-member/includes/
   class-config.php(642): apply_filters(‘um_email_notifi…’, Array) #3 /home/lesmoustvg/
   www/wp-content/plugins/ultimate-member/includes/class-init.php(1001): um\Config-
   >__construct() #4 /home/lesmoustvg/www/wp-content/plugins/ultimate-member/includes/
   core/class-setup.php(288): UM->config() #5 /home/lesmoustvg/www/wp-content/plugins/
   ultimate-member/includes/core/class-setup.php(26): um\core\Setup->set_default_settings()#
   6 /home/lesmoustvg/www/wp-content/plugins/ultimate-member/includes/class-init.
   php(483): um\core\Setup->run_setup() #7 /home/lesmoustvg/www/wp-content/plugins/
   ultimate-member/includes/class-init.php(413): UM->single_site_activation() #8/
   home/lesmoustvg/www/wp-includes/class-wp-hook.php(324): UM->activation(”) #9 /
   home/lesmoustvg/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”,
   Array) #10 /home/lesmoustvg/www/wp-includes/plugin.php(517): WP_Hook->do_action(
   Array) #11 /home/lesmoustvg/www/wp-admin/plugins.php(196): do_action(‘activate_ultima…’)#
   12 {main} thrown in **/home/lesmoustvg/www/wp-content/themes/Divi-Community/functions.
   php** on line **89**
 * Help, I don’t know what to do ! 😭
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-before-maj%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18242727)
 * [@melinach](https://wordpress.org/support/users/melinach/)
 * Do you have a custom code snippet in your active theme’s `functions.php` file?
   
   There is an issue in the `functions.php` file at line 89. Can you post the PHP
   code around this line here in the Forum?
 *  Thread Starter [melinach](https://wordpress.org/support/users/melinach/)
 * (@melinach)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18243065)
 * This is the code :
 *     ```wp-block-code
       <?php// ACTIVTATION DU THEME ENFANTfunction theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );}add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );// SUPPRESSION DU NUMERO DE VERSION DE WORDPRESSfunction dc_delete_version() {  return '';}add_filter('the_generator', 'dc_delete_version');// AJOUT DES ICONES FONT AWESOMEfunction dc_load_fontawesome() {  wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', null, '4.7.0' );}add_action('wp_enqueue_scripts', 'dc_load_fontawesome');// MASQUER LES ERREURS DE CONNEXION A L'ADMINISTRATIONfunction wpm_hide_errors() {    return "L'identifiant ou le mot de passe est incorrect";}add_filter('login_errors', 'wpm_hide_errors');//  Version 2.0 2022-09-20//  An email template for sending an email to the site admin when an UM User Profile is updated//  Source: https://github.com/MissVeronica/UM-Admin-User-Profile-Update-Emailadd_filter( 'um_email_notifications', 'custom_email_notifications_profile_is_updated', 10, 1 );add_action( 'um_user_after_updating_profile', 'custom_profile_is_updated_email', 10, 3 );add_action( 'profile_update', 'custom_profile_is_updated_email_backend', 10, 3 );add_filter( 'um_admin_settings_email_section_fields', 'um_admin_settings_email_section_fields_custom_forms', 10, 2 );function custom_email_notifications_profile_is_updated( $emails ) {    $custom_emails = array(                'profile_is_updated_email' => array(                'key'            => 'profile_is_updated_email',                'title'          => __( 'Profile is updated email', 'ultimate-member' ),                'subject'        => 'Profile Update {username}',                'body'           => '',                'description'    => __( 'To send an email to the site admin when a user profile is updated', 'ultimate-member' ),                'recipient'      => 'admin',                'default_active' => true ));    UM()->options()->options = array_merge( array(  'profile_is_updated_email_on'  => 1,                                                    'profile_is_updated_email_sub' => 'Profile Update {username}', ),                                            UM()->options()->options );    return array_merge( $custom_emails, $emails );}function um_admin_settings_email_section_fields_custom_forms( $section_fields, $email_key ) {    if( $email_key == 'profile_is_updated_email' ) {        $section_fields[] = array(                'id'            => $email_key . '_custom_forms',                'type'          => 'text',                'label'         => __( 'Include these UM Profile Forms for sending emails:', 'ultimate-member' ),                'conditional'   => array( $email_key . '_on', '=', 1 ),                'tooltip'       => __( 'Comma separated UM Profile Form IDs, empty send emails always.', 'ultimate-member' )                );    }    return $section_fields;}function custom_profile_is_updated_email_backend( $user_id, $old_data, $user_data ) {    if( isset( $_REQUEST['action']) && $_REQUEST['action'] == 'update' ) {        custom_profile_is_updated_email( $user_data, $user_id );    }}function custom_profile_is_updated_email( $to_update, $user_id, $args = array() ) {    global $current_user;    $forms = UM()->options()->get( 'profile_is_updated_email_custom_forms' );    if( !empty( $forms )) {        $forms = explode( ',', $forms );        if( is_array( $forms ) && !in_array( $args['form_id'], $forms )) return;    }    $submitted = um_user( 'submitted' );        foreach( $to_update as $key => $value ) {        $submitted[$key] = $value;    }    $registration_form_id = $submitted['form_id'];    $registration_timestamp = um_user( 'timestamp' );    $submitted['form_id'] = $args['form_id'];    update_user_meta( $user_id, 'submitted', $submitted );    update_user_meta( $user_id, 'timestamp', current_time( 'timestamp' ) );    UM()->user()->remove_cache( $user_id );    um_fetch_user( $user_id );    $time_format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );    um_fetch_user( $user_id );    $args['tags'] = array(  '{profile_url}',                            '{current_date}',                            '{updating_user}' );    $args['tags_replace'] = array(  um_user_profile_url( $user_id ),                                    date_i18n( $time_format, current_time( 'timestamp' )),                                    $current_user->user_login );    UM()->mail()->send( get_bloginfo( 'admin_email' ), 'profile_is_updated_email', $args );    $submitted['form_id'] = $registration_form_id;    update_user_meta( $user_id, 'submitted', $submitted );    update_user_meta( $user_id, 'timestamp', $registration_timestamp );    UM()->user()->remove_cache( $user_id );    um_fetch_user( $user_id );}
       ```
   
 * Line 89 :
 *     UM()->options()->options = array_merge( array(  ‘profile_is_updated_email_on’
   => 1,
 *                                                     ‘profile_is_updated_email_sub’
   => ‘Profile Update {username}’, ),
 *                                             UM()->options()->options );
 * It’s strange I haven’t touched anything… I don’t understand.
   Thank you very much
   🙏
 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18243091)
 * [@melinach](https://wordpress.org/support/users/melinach/)
 * This is a well known issue introduced with UM 2.8.5.
    More details about this
   issue and solutions here
 * [https://github.com/ultimatemember/ultimatemember/issues/1500 ](https://github.com/ultimatemember/ultimatemember/issues/1500)
 *  [missveronica](https://wordpress.org/support/users/missveronicatv/)
 * (@missveronicatv)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18243160)
 * [@melinach](https://wordpress.org/support/users/melinach/)
 * You can try to replace your function code with:
 *     ```
       function custom_email_notifications_profile_is_updated( $um_emails ) {
   
           $um_emails['profile_is_updated_email'] = array(
   
                       'key'            => 'profile_is_updated_email',
                       'title'          => __( 'Profile is updated email', 'ultimate-member' ),
                       'subject'        => 'Profile Update {username}',
                       'body'           => '',
                       'description'    => __( 'To send an email to the site admin when a user profile is updated', 'ultimate-member' ),
                       'recipient'      => 'admin',
                       'default_active' => true
                   );
   
           if ( UM()->options()->get( 'profile_is_updated_email_on' ) === '' ) {
               $email_on = empty( $um_emails['profile_is_updated_email']['default_active'] ) ? 0 : 1;
               UM()->options()->update( 'profile_is_updated_email_on', $email_on );
               UM()->options()->update( 'profile_is_updated_email_sub', $um__emails['profile_is_updated_email']['subject'] );
   
           }
   
           return $um_emails;
       }
       ```
   
 *  Plugin Support [Yurii](https://wordpress.org/support/users/yuriinalivaiko/)
 * (@yuriinalivaiko)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18244071)
 * Hello [@melinach](https://wordpress.org/support/users/melinach/)
 * You can not use `UM()->options()->options` in your custom code.
 * Use `UM()->options()->get( $option_id );` to get the option value.
   Use `UM()-
   >options()->update( $option_id, $value );` to update the option value.Use `UM()-
   >options()->remove( $option_id );` to delete the option.
 * Regards
 *  Thread Starter [melinach](https://wordpress.org/support/users/melinach/)
 * (@melinach)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18244947)
 * [@missveronicatv](https://wordpress.org/support/users/missveronicatv/)
 * Thank you so much for your help! it works! you saved my life 🙏

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fatal error before MAJ’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [melinach](https://wordpress.org/support/users/melinach/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/fatal-error-before-maj/#post-18244947)
 * Status: resolved