Support » Plugin: WP2Social Auto Publish » PHP 7.2 compatibility

  • Resolved msebald

    (@msebald)


    As I want to upgrade to PHP 7.2 I checked the last version of the plugin using PHP Compatibility Checker. Unfortunally it produced some errors and warnings.

    Is it possible to change the code to have full compatibility to PHP 7.2?

    Cheers,
    Martin

    FILE: wp-content/plugins/facebook-auto-publish/vendor/facebook/graph-sdk/src/Facebook/PseudoRandomString/McryptPseudoRandomStringGenerator.php
    ———————————————————————————————————————————————————————————-
    FOUND 3 ERRORS AFFECTING 1 LINE
    ———————————————————————————————————————————————————————————-
    57 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    57 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    57 | ERROR | The constant “MCRYPT_DEV_URANDOM” is deprecated since PHP 7.1 and removed since PHP 7.2
    ———————————————————————————————————————————————————————————-

    FILE: wp-content/plugins/facebook-auto-publish/admin/ajax-backlink.php
    ———————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————-
    1 | WARNING | File has mixed line endings; this may cause incorrect results
    ———————————————————————————————————-

    FILE: wp-content/plugins/facebook-auto-publish/xyz-functions.php
    —————————————————————————————————-
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————————-
    1 | WARNING | File has mixed line endings; this may cause incorrect results
    —————————————————————————————————-

Viewing 2 replies - 1 through 2 (of 2 total)
  • WP Facebook Auto Publish works fine on PHP 7.2. What you found are not errors, but compatibility codes for PHP 7.1 and older versions of PHP.
    A static analysis tool only tells you what code *exists*, not what branches will be taken on a particular version. The plugin is already fully compatible with all current PHP versions.

    Great, thank you for the information! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP 7.2 compatibility’ is closed to new replies.