• Hi Mark,

    I’m starting to plan for PHP 7 migration and ran the “PHP Compatibility” plugin on my site. It reported a few warnings and errors:

    Name: MSTW Schedules & Scoreboards
    
    FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-cdt-widget.php
    -----------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------------------------------
     31 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
    -----------------------------------------------------------------------------------------------------------------------------
    
    FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-csv-import-class.php
    ----------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------------------------------------------------
     565 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
     566 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
    ----------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-globals.php
    ---------------------------------------------------------------------------------------------------------------------------------------
    FOUND 2 ERRORS AFFECTING 2 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------
     24 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
     25 | ERROR | Function name, class name, namespace name or constant name can not be reserved keyword '__dir__' (since PHP version 5.3)
    ---------------------------------------------------------------------------------------------------------------------------------------
    
    FILE: /---/wp-content/plugins/mstw-schedules-scoreboards/includes/mstw-ss-schedule-widget.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.
    ----------------------------------------------------------------------------------------------------------------------------------
    

    The errors show up also when scanning for PHP 5.5 and 5.6; the warning only shows up for PHP 7. Just wanted to make you aware. I’ll not migrate before March 2017 so no hurry!

    -mallard66

Viewing 1 replies (of 1 total)
  • Plugin Author Mark O’Donnell

    (@markodonnell)

    Hallo Anders,
    Wie geht’s dir? I am aware of the class constructor issue – the WordPress world has been warning us for some time. I am weeding them out, slowly.

    I don’t quite understand the __DIR__ warning. This ‘magic constant’ was introduced in version 5.3. I’ve encountered issues with it in earlier versions of PHP, but it’s supported since 5.3. Maybe have a typo … __dir__ vs. __DIR__. I’ll take a look.

    Thank you.
    -Mark

Viewing 1 replies (of 1 total)
  • The topic ‘Errors and warnings from “PHP Compatibility” scan’ is closed to new replies.