PHP 7.0 compatibility
-
I upgraded my site to PHP 7.0 and installed the PHP compatibility checker plugin. It reports these errors and warnings:
FILE: ../wp-content/plugins/order-tracking/html/AdminFooter.php FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE 1 | WARNING | No PHP code was found in this file and short open tags are not allowed by this install of PHP. This file may be using short open tags but PHP does not allow them.
Can be solved by inserting an empty <?php tag.
FILE: ../wp-content/plugins/order-tracking/PHPExcel/Classes/PHPExcel/Calculation/Functions.php FOUND 1 ERROR AFFECTING 1 LINE 581 | ERROR | Using 'break' outside of a loop or switch structure is invalid and will throw a fatal error since PHP 7.0
Can be solved by removing that break statement, that (after a return) makes no sense anyway.
FILE: ../wp-content/plugins/order-tracking/PHPExcel/Classes/PHPExcel/Calculation/Database.php FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES 67 | WARNING | Method name "PHPExcel_Calculation_Database::__fieldExtract" is discouraged; PHP has reserved all method names with a double underscore prefix for future use 98 | WARNING | Method name "PHPExcel_Calculation_Database::__filter" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
Can be solved by removing the __ prefix from the function definitions and all references.
FILE: ../wp-content/plugins/order-tracking/PHPExcel/Classes/PHPExcel/Shared/JAMA/examples/Stats.php FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES 1428 | WARNING | Method name "Base::__sumdiff" is discouraged; PHP has reserved all method names with a double underscore prefix for future use 1460 | WARNING | Method name "Base::__calcVariance" is discouraged; PHP has reserved all method names with a double underscore prefix for future use 1488 | WARNING | Method name "Base::__calcAbsoluteDeviation" is discouraged; PHP has reserved all method names with a double underscore prefix for future use 1513 | WARNING | Method name "Base::__sumabsdev" is discouraged; PHP has reserved all method names with a double underscore prefix for future use 1545 | WARNING | Method name "Base::__format" is discouraged; PHP has reserved all method names with a double underscore prefix for future use
can be solved by removing the __ prefixes.
FILE: ../wp-content/plugins/order-tracking/PHPExcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES 215 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7. 5347 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since PHP 7.0 5378 | ERROR | Function set_magic_quotes_runtime() is deprecated since PHP 5.3 and removed since PHP 7.0
Replaced constructor by __construct function; removed deprecated functions.
FILE: ../wp-content/plugins/order-tracking/PHPExcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php FOUND 9 ERRORS AFFECTING 9 LINES 63 | ERROR | Extension 'sqlite' is removed since PHP 5.4 64 | ERROR | Extension 'sqlite' is removed since PHP 5.4 108 | ERROR | Extension 'sqlite' is removed since PHP 5.4 142 | ERROR | Extension 'sqlite' is removed since PHP 5.4 166 | ERROR | Extension 'sqlite' is removed since PHP 5.4 211 | ERROR | Extension 'sqlite' is removed since PHP 5.4 236 | ERROR | Extension 'sqlite' is removed since PHP 5.4 274 | ERROR | Extension 'sqlite' is removed since PHP 5.4 276 | ERROR | Extension 'sqlite' is removed since PHP 5.4
For this problem I don’t have a simple solution. The plugin seems to work fine, however.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP 7.0 compatibility’ is closed to new replies.