Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   PHP 7 compatibility (http://forum.bytesforall.com/showthread.php?t=23665)

jlbo Nov 15, 2016 09:07 AM

PHP 7 compatibility
 
Hello,

Is Atahualpa 3.7.24 compatible with PHP 7 ?
If no, is there a plan for a new version that would be PHP 7 compatible ?

Thanks,

juggledad Nov 15, 2016 10:32 AM

As far as I am aware, it is compatible

jlbo Nov 20, 2016 02:25 AM

Hello,

Thanks for your message.
I have the followings errors reported by a PHP code checker.

wp-content/themes/atahualpa/functions/bfa_m_find_in_dir.php
-------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------
29 | ERROR | Function ereg() is deprecated since PHP 5.3 and removed since PHP 7.0; use preg_match instead
29 | ERROR | Extension 'ereg' is deprecated since PHP 5.3 and removed since PHP 7.0 - use pcre instead.
52 | ERROR | Function eregi() is deprecated since PHP 5.3 and removed since PHP 7.0; use preg_match instead
52 | ERROR | Extension 'ereg' is deprecated since PHP 5.3 and removed since PHP 7.0 - use pcre instead.
-------------------------------------------------------------------------------------------------------------

and

themes/atahualpa/functions/bfa_ata_admin.php
--------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
368 | ERROR | Function eregi() is deprecated since PHP 5.3 and removed since PHP 7.0; use preg_match instead
368 | ERROR | Extension 'ereg' is deprecated since PHP 5.3 and removed since PHP 7.0 - use pcre instead.
--------------------------------------------------------------------------------------------------------------

also some warnings:

wp-content/themes/atahualpa/functions/JSON.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------
133 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
783 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
797 | WARNING | Use of deprecated PHP4 style class constructor is not supported since PHP 7.
----------------------------------------------------------------------------------------------

Do you think this has to be fixed in order to have atahualpa theme PHP 7 compatible ?

Thanks,

juggledad Nov 20, 2016 01:58 PM

!) You should find another PHP 7 compatibility checker. The 'errors' it found in bfa_m_find_in_dir.php and bfa_ata_admin.php happen to be comment lines, so the checker does not recognize comments and analyses them and throws an error if it finds something in a comment - it should ignore the entire line!

2) The warning are valid and can be dealt with by removing the file 'JSON.php' from the 'atahualpa/functions' folder and editing 'functions.php and deleting lines 96-101 which are:
HTML Code:

// Since 3.5.2: JSON for PHP 4 & 5.1:
if (!function_exists('json_decode')) {
        include_once (get_template_directory() . '/functions/JSON.php');
        function json_encode($data) { $json = new Services_JSON(); return( $json->encode($data) ); }
        function json_decode($data) { $json = new Services_JSON(); return( $json->decode($data) ); }
}



All times are GMT -6. The time now is 05:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.