• Resolved chinnynfdjshvbu32z87z3487

    (@chinnynfdjshvbu32z87z3487)


    Would love to use this plugin with PHP 7 but I get one warning checking the PHP compability

    ————————————————————————————————–

    FILE: /includes/admin/table-printer.php
    ——————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ——————————————————————————————————–
    28 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ——————————————————————————————————–

Viewing 11 replies - 1 through 11 (of 11 total)
  • A possible fix can be:

    
        function __construct($core){
            $this->core = $core;
    
            //Initialize layout and column definitions
            $this->setup_columns();
            $this->setup_layouts();
    
            //Figure out what the "safe" URL to acccess the current page would be.
            //This is used by the bulk action form.
            $special_args = array('_wpnonce', '_wp_http_referer', 'action', 'selected_links');
            $this->neutral_current_url = remove_query_arg($special_args);
        }
    
        function blcTablePrinter($core){
            self::__construct($core);
        }
    

    I fixed it manually but I’d love to see it added to the code here to avoid the warnings.

    Thanks!

    I can add one more warning with PHP 7:

    FILE: /www/htdocs/w00e137d/portfolios/alexanderhaller/wp-content/plugins/broken-link-checker/includes/utility-class.php
    —————————————————————————————–
    42 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4.

    I get the following warning also

    FILE: /includes/admin/table-printer.php
    ———————————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ———————————————————————————————————————–
    28 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ———————————————————————————————————————–

    Would love to know if this will be fixed soon.

    This is the only plugin keeping me from moving my sites to PHP 7.

    @ realmgic

    Where did you put the code?
    On functions.php file or somewhere else?

    Thanks in advance

    I have the same problem – can’t update to PHP 7 because of this plugin.

    FILE: …/broken-link-checker/includes/admin/table-printer.php
    ————————————————————————————————————–
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ————————————————————————————————————–
    28 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    ————————————————————————————————————–

    Please let us know if this will be fixed soon or I guess I will have to uninstall…

    You are wrong. I use PHP 7 with that plugin and perfect

    Same here … BLC 1.11.2 works fine with PHP 7.0.19 and cURL 7.19.7

    Has this been fixed yet?

    FILE: /home/.../public_html/wp/wp-content/plugins/broken-link-checker/includes/utility-class.php
    ----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------------
     42 | WARNING | INI directive 'safe_mode' is deprecated since PHP 5.3 and removed since PHP 5.4
    ----------------------------------------------------------------------------------------------------

    This appears as a warning in the PHP Compatibility Checker plugin. It shouldn’t stop us upgrading to PHP 7. It would be nice to remove this warning though.

    Hi @njesson “42 | WARNING | INI directive ‘safe_mode’ is deprecated since PHP 5.3 and removed since PHP 5.4”

    I think this is a “false positive” and there is nothing to fix the “offending code is:

    if ( version_compare( phpversion(), '5.3.0', '<' ) ) {
      $safe_mode = ini_get( 'safe_mode' ); // etc.

    i.e. plugin checks PHP version and “safe mode” is only “invoked” on PHP 5.2 or less – it is ignored in PHP 7

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘PHP 7 Warning’ is closed to new replies.