HongPong / broken-link-checker

This plugin will check your posts, comments and other content for broken links and missing images, and notify you if any are found. (non-commercial community fork of broken-link-checker)
10 stars 4 forks source link

Fix PHP7 warnings and fatal errors #23

Open HongPong opened 5 years ago

HongPong commented 5 years ago

Some may be already fixed by upstream fork contributors.

Originally reported in 2016 by @mAAdhaTTah and @era5mx :

Getting this message for a number of classes:

[23-Jan-2016 20:04:15 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; blcModule has a deprecated constructor in /path/to/plugins/broken-link-checker/includes/module-base.php on line 15
[23-Jan-2016 20:04:15 UTC] PHP Stack trace:
[23-Jan-2016 20:04:15 UTC] PHP   1. {main}() /path/to/wp/wp-admin/admin-ajax.php:0
[23-Jan-2016 20:04:15 UTC] PHP   2. require_once() /path/to/wp/wp-admin/admin-ajax.php:22
[23-Jan-2016 20:04:15 UTC] PHP   3. require_once() /path/to/wp/wp-load.php:42
[23-Jan-2016 20:04:15 UTC] PHP   4. require_once() /path/to/wp-config.php:9
[23-Jan-2016 20:04:15 UTC] PHP   5. do_action() /path/to/wp/wp-settings.php:392
[23-Jan-2016 20:04:15 UTC] PHP   6. blc_init() /path/to/wp/wp-includes/plugin.php:525
[23-Jan-2016 20:04:15 UTC] PHP   7. require_once() /path/to/plugins/broken-link-checker/core/init.php:303

Getting this message for a number of classes:

[23-Jan-2016 20:04:15 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; blcModule has a deprecated constructor in /path/to/plugins/broken-link-checker/includes/module-base.php on line 15
[23-Jan-2016 20:04:15 UTC] PHP Stack trace:
[23-Jan-2016 20:04:15 UTC] PHP   1. {main}() /path/to/wp/wp-admin/admin-ajax.php:0
[23-Jan-2016 20:04:15 UTC] PHP   2. require_once() /path/to/wp/wp-admin/admin-ajax.php:22
[23-Jan-2016 20:04:15 UTC] PHP   3. require_once() /path/to/wp/wp-load.php:42
[23-Jan-2016 20:04:15 UTC] PHP   4. require_once() /path/to/wp-config.php:9
[23-Jan-2016 20:04:15 UTC] PHP   5. do_action() /path/to/wp/wp-settings.php:392
[23-Jan-2016 20:04:15 UTC] PHP   6. blc_init() /path/to/wp/wp-includes/plugin.php:525
[23-Jan-2016 20:04:15 UTC] PHP   7. require_once() /path/to/plugins/broken-link-checker/core/init.php:303

Name: Broken Link Checker

FILE: /.../wp-content/plugins/broken-link-checker/includes/admin/table-printer.php

FOUND 1 ERROR AFFECTING 1 LINE

28 | ERROR | Deprecated PHP4 style constructor are not supported since PHP7

FILE: /.../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 from PHP 5.3 and forbidden from PHP 5.4.