• Hi there.

    I think there is an issue with PHP 7
    if i try to activate it says

    Fatal error: Cannot use “self” when no class scope is active in /public_html/xxxx.org/wp-content/plugins/geolocation-detector-for-gravity-forms/geolocation-detector-for-gravity-forms.php on line 45

    That line is
    if(!IS_ADMIN && !empty($field[“maxLength”]) && is_numeric($field[“maxLength”]))
    $max_chars = self::get_counter_script($form_id, $field_id, $field[“maxLength”]);

    cannot seem to get around this error.

    Any suggestions?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I second that.

    When migrating to a server with PHP 7 I got the following error:

    PHP Fatal error: Cannot use “self” when no class scope is active in /nas/content/live/apptamin/wp-content/plugins/geolocation-detector-for-gravity-forms/geolocation-detector-for-gravity-forms.php on line 45

    Best,
    Sylvain

    Hi,

    Any news on this?

    Hey. Also had this issue when upgrading some sites to PHP7. Making the following change fixes the issue. Please update the plugin with the change (if you agree it does the job).
    In line 45 of the “geolocation-detector-for-gravity-forms.php” file:
    Change:
    $max_chars = self::get_counter_script($form_id, $field_id, $field[“maxLength”]);
    To:
    $max_chars = $this->get_counter_script($form_id, $field_id, $field[“maxLength”]);

    This worked for me

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error when trying to Activate’ is closed to new replies.