• Resolved rhbkweb

    (@rhbkweb)


    Hi,

    Im using WordPress 4.6.1 + Instant Articles v1.4 on a server with PHP 7 and when running the compatibility test using the “PHP Compatibility Checker” plugin it says this plugin is not PHP 7 compatible showing 19 Errors as you can see bellow.

    So my question to the developers of this plugin is if PHP7 support is planned and if yes, do you have a expected timeframe? This plugin is great but without PHP 7 full compatibility i cannot usit on my clients websites.

    NextScripts: Social Networks Auto-Poster
    Not PHP 7.0 compatible.
    —-
    FILE: /var/www/mydomain.com/htdocs/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/st.api.php
    —————————————————————————————–
    FOUND 1 ERROR AFFECTING 1 LINE
    —————————————————————————————–
    312 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
    ——————————————————————————————
    FILE: /var/www/mydomain.com/htdocs/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/inc-cl/apis/xmlrpc-client.php
    ———————————————————————————————
    FOUND 15 ERRORS AFFECTING 15 LINES
    ———————————————————————————————
    49 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    193 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    351 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    371 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0 – use php://input instead.
    372 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0 – use php://input instead.
    376 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0 – use php://input instead.
    554 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    607 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    832 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    878 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    936 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    958 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    1120 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    1191 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    1381 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7
    ———————————————————————————————-
    FILE: /var/www/mydomain.com/htdocs/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/NextScripts_SNAP.php
    ———————————————————————————————–
    FOUND 1 ERROR AFFECTING 1 LINE
    ————————————————————————————————
    185 | ERROR | ‘int’ is a reserved keyword introduced in PHP version 7.0 and cannot be invoked as a function (T_STRING)
    ————————————————————————————————-
    FILE: /var/www/mydomain.com/htdocs/wp-content/plugins/social-networks-auto-poster-facebook-twitter-g/nxs_functions.php
    —————————————————————————————-
    FOUND 2 ERRORS AFFECTING 2 LINES
    —————————————————————————————-
    30 | ERROR | preg_replace() – /e modifier is forbidden in PHP 7.0
    31 | ERROR | preg_replace() – /e modifier is forbidden in PHP 7.0
    —————————————————————————————–

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rhbkweb

    (@rhbkweb)

    On the first line of my previous message i made a mistake.

    It’s not: Im using WordPress 4.6.1 + Instant Articles v1.4..

    Instead is: Im using WordPress 4.6.1 + NextScripts: Social Networks Auto-Poster v3.7.2.

    Sorry

    Plugin Author NextScripts

    (@nextscripts)

    SNAP is compatible with PHP7 since version 3.4.26. There are no critical errors and it can work, but thanks for that list, we will check it.

    Thread Starter rhbkweb

    (@rhbkweb)

    Hi @nextscripts,

    Thanks for the support. My test was made using the plugin https://pt.wordpress.org/plugins/php-compatibility-checker/ that was developed by wpengine team.

    I really appreciate your team to check this out to ensure thare are no problems with PHP 7.

    Keep up the good work!

    Thanks

    Plugin Author NextScripts

    (@nextscripts)

    BTW, that checker is not very smart.

    For example:

    FOUND 1 ERROR AFFECTING 1 LINE
    —————————————————————————————–
    312 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0

    The real problem example:

    $a = (1 >> -1);

    That will cause an error because of negative value -1.

    Our code:

    if ($a&0x80000000 && $b>0) {
    $a = ($a>>1) & 0x7fffffff;
    $a = $a >> ($b-1); //## Your checker thinks this line is a problem.
    }

    We are already checking that $b>0 and $b-1 can’t be negative.

    So now we need to rewrite that totally good code.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problems with PHP7’ is closed to new replies.