• Resolved blakemiller

    (@blakemiller)


    I have a centralized, custom ACF options page built with a few dozen fields that writes and controls various areas of the website. Here is more info on that feature: https://www.advancedcustomfields.com/resources/options-page/

    There are 3 fields that always throw an error when they are modified / saved from the ACF options page: BlogName, BlogDescription and Timezone_string. Here is my function that saves the ACF fields to those WP Fields.

    NOTE: The fields actually save, but the error is coming afterwards, presumably when trying to be logged by AYRO.

    update_option('blogname', get_field('platform_title', 'options'), true); // Write custom Site Title
    update_option('blogdescription', get_field('platform_subtitle', 'options'), true); // Write custom site Sub-Title Tagline
    update_option('timezone_string',get_field('platform_timezone','options'), true); // Write custom timezone 

    Here is the PHP error

    PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function get_user_by() in /wp-content/plugins/aryo-activity-log/classes/class-aal-api.php:89
    Stack trace:
    #0 /wp-content/plugins/aryo-activity-log/classes/class-aal-api.php(161): AAL_API->insert()
    #1 /wp-content/plugins/aryo-activity-log/hooks/class-aal-hook-options.php(105): aal_insert_log()
    #2 /wp-content/plugins/aryo-activity-log/hooks/class-aal-hook-options.php(96): AAL_Hook_Options->insert_log()
    #3 /wp-includes/class-wp-hook.php(308): AAL_Hook_Options->hooks_updated_option()
    #4 /wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #5 /wp-includes/plugin.php(517): WP_Hook->do_action()
    

    This is a similar error as to the one reported last year – https://www.ads-software.com/support/topic/fatal-error-when-programmatically-deactivating-a-plugin/

    Is there anything that can be done with this?

    • This topic was modified 1 year, 8 months ago by blakemiller.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal Error’ is closed to new replies.