• Using php-compatibility-checker with PHP 7.2.

    Is it compatible?

    Yes there are “WARNINGS”, but it did spit out “ERRORS”…

    #############################################################
    #############################################################
    FILE: ~/wp-content/plugins/better-wp-security/core/class-itsec-core.php
    ————————————————————————————————————————————
    FOUND 4 ERRORS AFFECTING 3 LINES
    ————————————————————————————————————————————
    469 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
    471 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
    471 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
    473 | ERROR | Global variable ‘$HTTP_RAW_POST_DATA’ is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
    ————————————————————————————————————————————
    #############################################################
    #############################################################

    Below is the relevant code :

    #############################################################
    #############################################################
    462 //Admin bar links
    463 if ( ! isset( $itsec_globals[‘settings’][‘hide_admin_bar’] ) || $itsec_globals[‘settings’][‘hide_admin_bar’] === false ) {
    464 add_action( ‘admin_bar_menu’, array( $this, ‘admin_bar_links’ ), 99 );
    465 }
    466
    467 if ( isset( $itsec_globals[‘settings’][‘infinitewp_compatibility’] ) && $itsec_globals[‘settings’][‘infinitewp_compatibility’] === true ) {
    468
    469 $HTTP_RAW_POST_DATA = @file_get_contents( ‘php://input’ );
    470
    471 if ( $HTTP_RAW_POST_DATA !== false && strlen( $HTTP_RAW_POST_DATA ) > 0 ) {
    472
    473 $data = base64_decode( $HTTP_RAW_POST_DATA );
    474
    475 if ( strpos( $data, ‘s:10:”iwp_action”;’ ) !== false ) {
    476 $itsec_globals[‘is_iwp_call’] = true;
    477 }
    478
    479 }
    480
    481 }

Viewing 1 replies (of 1 total)
  • According to the 5.6.1 Changelog:

    Compatibility Fix: Changed name of the $HTTP_RAW_POST_DATA variable to avoid erroneously tripping PHP 7 compatibility checks.

    Perhaps you should update the plugin 😉

Viewing 1 replies (of 1 total)

The topic ‘Checking for PHP 7.2 compatibility’ is closed to new replies.