PHP Codesniffer Errors
-
My company has ran PHP Codesniffer for PHP 5.6 on all of our WordPress sites and all are coming back with PHP Codesniffer errors. Many of the errors pertain to plugins (which are out of our hands), but many of the errors pertain to WP Core as well. A few examples:
FILE: /home/site/site.org/public_html/wp-includes/Text/Diff.php
———————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
———————————————————————-
128 | ERROR | ‘clone’ is a reserved keyword introduced in PHP
| | version 5.0 and cannot be invoked as a function
| | (T_CLONE)
———————————————————————-FILE: …/site/site.org/public_html/wp-includes/class-phpmailer.php
———————————————————————-
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES
———————————————————————-
674 | WARNING | INI directive ‘safe_mode’ is deprecated from PHP
| | 5.3 and forbidden from PHP 5.4.
1357 | WARNING | INI directive ‘safe_mode’ is deprecated from PHP
| | 5.3 and forbidden from PHP 5.4.
2526 | ERROR | The use of function set_magic_quotes_runtime is
| | discouraged from PHP version 5.3 and forbidden from
| | PHP version 5.4
2531 | WARNING | INI directive ‘magic_quotes_runtime’ is deprecated
| | from PHP 5.3 and forbidden from PHP 5.4.
2538 | ERROR | The use of function set_magic_quotes_runtime is
| | discouraged from PHP version 5.3 and forbidden from
| | PHP version 5.4
2540 | WARNING | INI directive ‘magic_quotes_runtime’ is deprecated
| | from PHP 5.3 and forbidden from PHP 5.4.
———————————————————————-Does anyone know why errors might still be popping up in this report if our core has been updated to 4.5.2 and WordPress claims it’s compatible with PHP 7?
- The topic ‘PHP Codesniffer Errors’ is closed to new replies.