• Resolved nootkan

    (@nootkan)


    Hi guys, fyi, just finished a compatibility test on the a3 lazy load plugin (which is working fine for me on php7.0) for php 7.2 and see the following 8 errors and 16 warnings:

    Name: a3 Lazy Load
    FILE: /home/wp-content/plugins/a3-lazy-load/admin/settings/template-settings/global-settings.php
    ———————————————————————————————————————————————-
    FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ———————————————————————————————————————————————-
    117 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’admin_interface’}
    117 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    139 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’admin_interface’}
    139 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    185 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’admin_interface’}
    185 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    ———————————————————————————————————————————————-
    FILE: /home/wp-content/plugins/a3-lazy-load/admin/admin-pages/admin-settings-page.php
    —————————————————————————————————————————————–
    FOUND 1 ERROR AND 1 WARNING AFFECTING 1 LINE
    —————————————————————————————————————————————–
    108 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’admin_init’}
    108 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    —————————————————————————————————————————————–
    FILE: /home/wp-content/plugins/a3-lazy-load/admin/a3-lazy-load-admin.php
    —————————————————————————————————————————————
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    —————————————————————————————————————————————
    6 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’admin_init’}
    21 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’admin_init’}
    30 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’admin_init’}
    —————————————————————————————————————————————
    FILE: /home/wp-content/plugins/a3-lazy-load/admin/admin-interface.php
    ——————————————————————————————————————————————
    FOUND 4 ERRORS AND 6 WARNINGS AFFECTING 5 LINES
    ——————————————————————————————————————————————
    301 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’fonts_face’}
    301 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    305 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’uploader’}
    305 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    429 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$option_name}
    468 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$id_attribute}
    1363 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’fonts_face’}
    1363 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    1363 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$this->plugin_prefix.’uploader’}
    1363 | ERROR | “$this” can no longer be used with the “global” keyword since PHP 7.1.
    ——————————————————————————————————————————————
    FILE: /home/wp-content/plugins/a3-lazy-load/a3-lazy-load.php
    ——————————————————————————————————————————————–
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ——————————————————————————————————————————————–
    47 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’admin_interface’}
    53 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’admin_init’}
    56 | WARNING | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${A3_LAZY_LOAD_PREFIX.’less’}
    ——————————————————————————————————————————————–

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

    (@nootkan)

    Sorry forgot to add this was for Version 2.2.2.

    Plugin Author Steve Truman

    (@a3rev)

    @nootkan

    Have test again with PHP 7.2 and cannot reproduce those errors or any PHP errors.

    Have test on locals, and on live site and just cannot reproduce the issue.

    In our tests there are no PHP errors, warnings or notices for PHP versions 7.0, 7.1, 7.2, 7.3 or 7.4

    Can you make any suggestions as to how we can reproduce this?

    Where did the error report come from? Is it WP_DEBUG on a site or form the server ?

    Steve

    Thread Starter nootkan

    (@nootkan)

    Hi Steve, the report came from the php compatibility checker plugin.

    Your plugin is working for me with php 7.2 but thought I’d forward these to you in case they were accurate.

    Sorry should have mentioned this in my first post.

    Plugin Author Steve Truman

    (@a3rev)

    @nootkan

    Hi – we just are releasing maintenance version 2.3.1 of a3 Lazy Load.

    After checking the code against every Linter, online tester that we could think of and not coming up with those warnings anywhere else I reached out to the PHP Compatibility Checker team to confirmed the basis of the rules that their plugin Lints on and why our code was tripping those warnings.

    Based on their feedback we have update the Globals which where triggering the Warnings and can now run the PHP Checker in 7.0 to 7.3 and it returns the green [Compatible] tag with no warnings or errors.

    The errors that it was returning were caused by the plugin reading some old commented out code. To resolve those we have just removed that old code that was not active anyway.

    Please upgrade to the new version and have a test to confirm for yourself.

    Thanks for taking the time to let me know about the issue – much appreciated.

    I will change this ticket status to resolved. You can still reply if you wish.

    Steve

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility Warnings for Php 7.2’ is closed to new replies.