• Hi,

    We started getting the following error in our footer:

    
    Fatal error: Cannot redeclare getDomain() (previously declared in /path/to/wp-content/plugins/ultimate-social-media-icons/libs/controllers/sfsiocns_OnPosts.php:324) in /path/to/wp-content/plugins/ultimate-social-media-icons/libs/controllers/sfsiocns_OnPosts.php on line 324
    

    We’re using Ultimate Social Media Icons v2.2.2, PHP 7.2.18, and WP 5.2 (I tried downgrading to WP 5.1.1 but the problem persisted).

    The temporary workaround was to add an if( ! function_exists('getDomain') ) wrapper around the function declaration.

    Please assist.

    Thanks,
    Vinny

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor socialtech

    (@socialtech)

    Thank you for reporting this!

    We will try to replicate the issue on our end.

    The quick fix for this: on the plugin’s settings page there is an option to switch this “Error reporting” off (at the bottom of question 6).

    Could you please try that?

    Thanks, I just tried that.

    Suppressing the error message no longer displays the actual message, but still messes up the footer.

    After further thought, having a function called getDomain is not a good idea. You should at least add a unique prefix to it or turn it into a method within a class to avoid naming conflicts.

    Plugin Contributor socialtech

    (@socialtech)

    We accidentally had a function named getDomain but this is only once and shouldn’t conflict.

    Changed the references and removed the unwanted function.

    Will be released with next version of the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error in footer’ is closed to new replies.