Support » Plugin: WP Mail SMTP by WPForms » PHP 7.2 compatibility….

  • Resolved hometownstructures

    (@hometowntrailers)



    Can you please confirm/deny the PHP 7.2 compatibility? I’m receiving this error report on a PHP 7.2 compatibility test:

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    —————————————————————————————
    FOUND 5 ERRORS AFFECTING 2 LINES
    —————————————————————————————
    65 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    65 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    104 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    104 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    104 | ERROR | The constant “MCRYPT_DEV_URANDOM” is deprecated since PHP 7.1 and removed since PHP 7.2
    —————————————————————————————

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
    —————————————————————————————FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————
    10 | WARNING | INI directive ‘mbstring.func_overload’ is deprecated since PHP 7.2
    —————————————————————————————

    FILE: /nas/content/live/hometowntraile/wp-content/plugins/wp-mail-smtp/vendor/guzzlehttp/promises/src/functions.php
    —————————————————————————————
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    —————————————————————————————
    222 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    257 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    313 | WARNING | Function each() is deprecated since PHP 7.2; Use a foreach loop instead
    —————————————————————————————

    Please reply. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • TerraFrost

    (@terrafrost)

    I can tell you that at least some of those are completely bogus. For example, the ones relating to phpseclib. This plugin is using a fairly new version of phpseclib it looks like:

    https://plugins.trac.wordpress.org/browser/wp-mail-smtp/tags/1.2.5/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php

    https://github.com/phpseclib/phpseclib/issues/1229#issuecomment-351066079 explains why it’s not an issue.

    Static code analyzers are not 100% accurate and you should take their findings with a grain of salt.

    Plugin Author Slava Abakumov

    (@slaffik)

    Thanks, @terrafrost. You are correct. phpseclib library version is just several months old.

    @hometowntrailers, with that, I’m resolving this thread.

    Same issue testing PHP 7.1 compatibility:

    FILE: /home/ayudawp7/public_html/wp-content/plugins/wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    ---------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------
      69 | WARNING | Extension 'mcrypt' is deprecated since PHP 7.1 - use openssl (preferred) or pecl/mcrypt once available instead.
      69 | WARNING | Function mcrypt_create_iv() is deprecated since PHP 7.1; use OpenSSL instead
     108 | WARNING | Extension 'mcrypt' is deprecated since PHP 7.1 - use openssl (preferred) or pecl/mcrypt once available instead.
     108 | WARNING | Function mcrypt_create_iv() is deprecated since PHP 7.1; use OpenSSL instead
    ---------------------------------------------------------------------------------------------------------------------------------

    Dear WPForms,

    You say:

    Requires PHP Version: 5.3

    Is this plug-in compatible with PHP 7.x?

    After running the code against WP Compatibility Checker or Code Sniffer with the PHPCompatibility sniffs, it generates some warnings:

    
    FILE: ...lugins/wp-mail-smtp/vendor/guzzlehttp/promises/src/functions.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ----------------------------------------------------------------------
     222 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
     257 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
     313 | WARNING | Function each() is deprecated since PHP 7.2; Use a
         |         | foreach loop instead
    ----------------------------------------------------------------------
    
    FILE: .../wp-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------
     10 | WARNING | INI directive 'mbstring.func_overload' is deprecated
        |         | since PHP 7.2
    ----------------------------------------------------------------------
    
    FILE: ...-mail-smtp/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php
    ----------------------------------------------------------------------
    FOUND 5 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------
      69 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
         |       | removed since PHP 7.2; Use openssl (preferred) or
         |       | pecl/mcrypt once available instead
      69 | ERROR | Function mcrypt_create_iv() is deprecated since PHP
         |       | 7.1 and removed since PHP 7.2; Use random_bytes() or
         |       | OpenSSL instead
     108 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and
         |       | removed since PHP 7.2; Use openssl (preferred) or
         |       | pecl/mcrypt once available instead
     108 | ERROR | Function mcrypt_create_iv() is deprecated since PHP
         |       | 7.1 and removed since PHP 7.2; Use random_bytes() or
         |       | OpenSSL instead
     108 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since
         |       | PHP 7.1 and removed since PHP 7.2
    ----------------------------------------------------------------------
    

    Same with Phan

    
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:73 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:81 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:95 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Collection.php:96 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Model.php:105 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    wp-mail-smtp/vendor/google/apiclient/src/Google/Model.php:107 PhanCompatiblePHP7 Expression may not be PHP 7 compatible
    

    Do you know if a review / fix is planned?

    Thanks a lot,

    Best regards.

    Alexandre

    Plugin Author Slava Abakumov

    (@slaffik)

    WP Mail SMTP plugin is compatible with PHP 7.0, 7.1 and 7.2 and works without issues on those versions.

    Thanks Slaffik for the confirmation.

    Best regards,

    Alexandre 8)

    After upgrading php from 5.2 to 7.2 , while checking out on woocomeerce getting internal server error, when i check the error log in woocommerce it gives the following. Please suggest the solution. Thanks

    CRITICAL Uncaught ArgumentCountError: Too few arguments to function iwc_display_payment_method_email_order(), 1 passed in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php on line 288 and exactly 2 expected in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/functions.php:133
    Stack trace:
    #0 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php(288): iwc_display_payment_method_email_order(Object(WC_Order))
    #1 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
    #2 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #3 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/woocommerce/emails/email-order-details.php(89): do_action(‘woocommerce_ema…’, Object(WC_Order), true, false, Object(WC_Email_New_Order))
    #4 /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/plugins/woocomm in /home/content/n3pnexwpnas04_data01/18/41356818/html/wp-content/themes/lensa/functions.php on line 133

    Plugin Author Slava Abakumov

    (@slaffik)

    @vipul-saxena
    And why do you post it here and not in theme support forum?
    The issue is with the theme, not a plugin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.