• AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: method_exists(): Argument 
    #1 ($object_or_class) must be of type object|string, null given in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/awsm-team-pro/awsm-team.php:1504\nStack trace:\n
    #0 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/awsm-team-pro/awsm-team.php(1504): method_exists()\n
    #1 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php(324): Awsm_Team->team_helper()\n
    #2 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n
    #3 /var/www/vhosts/domain.com/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action()\n
    #4 /var/www/vhosts/domain.com/httpdocs/wp-includes/media.php(4957): do_action()\n
    #5 /var/www/vhosts/domain.com/httpdocs/wp-admin/includes/media.php(651): wp_enqueue_media()\n
    #6 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php(324): media_buttons()\n
    #7 /var/www/vhosts/domain.com/httpdocs/wp-...', referer: https://www.domain.com/sub-site/wp-admin/post.php?post=4&action=edit

    We are seeing the above error message in when adding a siteorigin page builder text editor widget to a page. Just thought I would bring it to your attention as it appears to be coming from line 1504 in /awsm-team-pro/awsm-team.php. It might be a PHP 8.x incompatibility error.

    • This topic was modified 7 months, 2 weeks ago by Joel Lisenby.
Viewing 1 replies (of 1 total)
  • Thread Starter Joel Lisenby

    (@joellisenby)

    Changing line 1504 of /awsm-team-pro/awsm-team.php to the following resolves the error

    if(!empty( $screen ) && method_exists($screen, 'is_block_editor') && $screen->is_block_editor()) {

    get_current_screen() returns null if no screen is set, and for some reason when adding a siteorigin editor block, your function is running, but get_current_screen() is returning null

    https://developer.www.ads-software.com/reference/functions/get_current_screen/

    There may be a deeper issue involving SiteOrigin Page Builder, or your plugin code is running in these cases when it might not be necessary?

    • This reply was modified 7 months, 2 weeks ago by Joel Lisenby.
    • This reply was modified 7 months, 2 weeks ago by Joel Lisenby.
Viewing 1 replies (of 1 total)
  • The topic ‘PHP 8.x Fatal error in /awsm-team-pro/awsm-team.php’ is closed to new replies.