• Resolved HelgaTheViking

    (@helgatheviking)


    This plugin is throwing errors when other plugins activate. I just tried to activate it with the Ninja Forms AWeber extension (I’m the author and I just got a ticket complaining that my plugin would not activate).

    However, they mistakenly read the error message as my plugin isn’t compatible with PHP5.2, when it’s your plugin throwing that error:

    
    if (function_exists('register_activation_hook')) {
        if (!function_exists('aweber_web_forms_activate')) {
            function aweber_web_forms_activate() {
                if (version_compare(phpversion(), '5.2', '<')) {
                    trigger_error('', E_USER_ERROR);
                }
            }
        }
    
        register_activation_hook(__FILE__, 'aweber_web_forms_activate');
    }
    
    if (isset($_GET['action']) and $_GET['action'] == 'error_scrape') {
        die('Sorry, AWeber Web Forms requires PHP 5.2 or higher. Please deactivate AWeber Web Forms.');
    }

    I would recommend not running this on the activation hook as it’s likely to interfere with other plugins… and it seems to be incorrectly comparing the versions anyway as PHP 7.x is triggering the error.

  • The topic ‘Plugin causing errors when other plugins are activated’ is closed to new replies.