Title: PHP Compatibility Errors
Last modified: January 20, 2021

---

# PHP Compatibility Errors

 *  Resolved [Ebonie Butler](https://wordpress.org/support/users/metalandcoffee/)
 * (@metalandcoffee)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-compatibility-errors/)
 * I ran the PHP Compatibility ruleset ([https://github.com/PHPCompatibility/PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP))
   against the plugin code (version 2.6.20) and here are the results. I am wondering
   how critical these warnings/errors are as I plan an upgrade to PHP 7.4 and if
   any one of them plan to be addressed.
 *     ```
       FILE: plugins/ad-inserter/includes/dst/dst.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------
        178 | WARNING | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the
            |         | original value as passed to a parameter, but will instead provide the current value. The
            |         | parameter "$_settings" was used, and possibly changed (by reference), on line 177.
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/includes/phpQuery.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 1 ERROR AND 5 WARNINGS AFFECTING 6 LINES
       -----------------------------------------------------------------------------------------------------------------
        1618 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the
             |         | original value as passed to a parameter, but will instead provide the current value. The
             |         | parameter "$index" was used, and possibly changed (by reference), on line 1614.
        1649 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the
             |         | original value as passed to a parameter, but will instead provide the current value. The
             |         | parameter "$index" was used, and possibly changed (by reference), on line 1640.
        1675 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the
             |         | original value as passed to a parameter, but will instead provide the current value. The
             |         | parameter "$index" was used, and possibly changed (by reference), on line 1667.
        3073 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the
             |         | original value as passed to a parameter, but will instead provide the current value. The
             |         | parameter "$html" was used, and possibly changed (by reference), on line 3051.
        3495 | WARNING | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the
             |         | original value as passed to a parameter, but will instead provide the current value. The
             |         | parameter "$text" was used, and possibly changed (by reference), on line 3493.
        3527 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/includes/google-api/Signer/P12.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------
        75 | WARNING | Function openssl_pkey_free() is deprecated since PHP 8.0
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/includes/google-api/Http/REST.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 1 ERROR AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------
        173 | ERROR | Passing the $glue and $pieces parameters in reverse order to implode has been deprecated since
            |       | PHP 7.4 and is removed since PHP 8.0; $glue should be the first parameter and $pieces the second
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/includes/google-api/Verifier/Pem.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------
        53 | WARNING | Function openssl_x509_free() is deprecated since PHP 8.0
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/includes/google-api/Utils.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 1 ERROR AFFECTING 1 LINE
       -----------------------------------------------------------------------------------------------------------------
        65 | ERROR | [x] Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP
           |       |     7.4 and removed in PHP 8.0. Found: $str{$ret}
       -----------------------------------------------------------------------------------------------------------------
       PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
       -----------------------------------------------------------------------------------------------------------------
   
       FILE: plugins/ad-inserter/ad-inserter.php
       -----------------------------------------------------------------------------------------------------------------
       FOUND 9 ERRORS AND 1 WARNING AFFECTING 10 LINES
       -----------------------------------------------------------------------------------------------------------------
        7324 | WARNING | Declaring a required parameter after an optional one is deprecated since PHP 8.0. Parameter
             |         | $block_parameter is optional, while parameter $block is required.
        7420 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        7590 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        7807 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        7987 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        8119 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        8203 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        8340 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        8747 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
        8986 | ERROR   | "$this" can no longer be used in a plain function or method since PHP 7.1.
       -----------------------------------------------------------------------------------------------------------------
   
       Time: 8.34 secs; Memory: 112.01MB
       ```
   
    -  This topic was modified 5 years, 4 months ago by [Ebonie Butler](https://wordpress.org/support/users/metalandcoffee/).
    -  This topic was modified 5 years, 4 months ago by [Ebonie Butler](https://wordpress.org/support/users/metalandcoffee/).

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

 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-compatibility-errors/#post-13934596)
 * Hello,
 * thanks for the info.
    All the identified issues will be fixed.
 * The plugin should work fine with PHP 7.4.
 *  Plugin Author [Spacetime](https://wordpress.org/support/users/spacetime/)
 * (@spacetime)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-compatibility-errors/#post-13950609)
 * Hello,
 * it seems some warning are false positives.
    Google api is used only in the backend
   for AdSense account access, will be updated once the new library is checked.
 * Other errors are fixed in the development version.
 * Thanks again.

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

The topic ‘PHP Compatibility Errors’ is closed to new replies.

 * ![](https://ps.w.org/ad-inserter/assets/icon-256x256.jpg?rev=1502039)
 * [Ad Inserter - Ad Manager & AdSense Ads](https://wordpress.org/plugins/ad-inserter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ad-inserter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ad-inserter/)
 * [Active Topics](https://wordpress.org/support/plugin/ad-inserter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ad-inserter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ad-inserter/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Spacetime](https://wordpress.org/support/users/spacetime/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-compatibility-errors/#post-13950609)
 * Status: resolved