Support » Plugin: CF Geo Plugin - WordPress Geo Plugin » Plugin suitable for PHP 7.2?

  • Resolved Samvdh

    (@samvdh)


    Hello

    I want to update my PHP version to 7.2. However, if I check with a Comptability Checker, I notice that this plugin (CF Geo) is showing a lot of warnings and errors. The Comptability Checker therefore shows it as not possible to update.

    Is this a false negative, or will a future update make sure that I can still use the CG Geo (premium) version?

    Thank you!
    Kind regards
    Sam

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ivijan-Stefan Stipic

    (@ivijanstefan)

    It’s look like that is false alarm but we will double check all and notify you.

    CF Geo Plugin is written carefully and we have compatibility and transition codes and maybe that generate warnings.

    When we produce plugin we add support for the some old versions of the WordPress and some support for the PHP versions from the 4.0.0 but most of the code is written for the PHP 7.x and we constantly update code to support all higher PHP versions.

    Here is example how we do some transitions and version checks:

    /**
     * Start sessions if not exists
     *
     * @author     Ivijan-Stefan Stipic <creativform@gmail.com>
     */
    if (version_compare(PHP_VERSION, '7.0.0') >= 0) {
    	if(function_exists('session_status') && session_status() == PHP_SESSION_NONE) {
    		session_start(array(
    		  'cache_limiter' => 'private_no_expire',
    		  'read_and_close' => false,
    	   ));
    	}
    }
    else if (version_compare(PHP_VERSION, '5.4.0') >= 0)
    {
    	if (function_exists('session_status') && session_status() == PHP_SESSION_NONE) {
    		session_cache_limiter('private_no_expire');
    		session_start();
    	}
    }
    else
    {
    	if(session_id() == '') {
    		if(version_compare(PHP_VERSION, '4.0.0') >= 0){
    			session_cache_limiter('private_no_expire');
    		}
    		session_start();
    	}
    }

    Like you see, many compatibility checkers will “scream” while detect some old codes or approach, but we just use simple version and functionality switch.

    If you notice any problem, just let us know. It would be helpful to you place warnings to we can see what you get it.

    Thanks!

    Hi Ivijan-Stefan

    I think I was a little bit too fast indeed. I had no issues once I updated my PHP version.

    Thank you for your thorough explanation!

    Sam

    Plugin Author Ivijan-Stefan Stipic

    (@ivijanstefan)

    It’s no problem, you are here to ask.

    Yes, this plugins for the compatibility check don’t understand transition codes and cause a lot of logs.

    We test on the PHP 7.3 and there is no errors.

    It you like, you can give us some vote 😉

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin suitable for PHP 7.2?’ is closed to new replies.