• Hi.

    I like your plugin and wanted to use it on my page. I’m using required PHP version (5.4.9), but version_compare returns 0, because the function considers these versions “equal”. I’ve submitted a patch.

    ---
     wp-content/plugins/commonwp/commonwp.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/wp-content/plugins/commonwp/commonwp.php b/wp-content/plugins/commonwp/commonwp.php
    index 3299a36..fb57e5a 100644
    --- a/wp-content/plugins/commonwp/commonwp.php
    +++ b/wp-content/plugins/commonwp/commonwp.php
    @@ -13,7 +13,7 @@
      */
     
     // Check minimum required PHP version.
    -if ( version_compare( phpversion(), '5.4.0', '<' ) ) {
    +if ( version_compare( phpversion(), '5.4.0', '<=' ) ) {
     	return;
     }
     
    -- 
Viewing 1 replies (of 1 total)
  • Thread Starter jarosz

    (@jarosz)

    Hi.

    Please delete this topic. I’ve made a premature patch. Plugin is working fine without it, and I believe some bad testing led me to break the code.

    Best regards
    Jacek Roszkowski

Viewing 1 replies (of 1 total)
  • The topic ‘Correct required PHP version check’ is closed to new replies.