Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating »

Compatibility with PHP 8.1


  #1  
Old Sep 19, 2022, 04:09 AM
extremecarver
 
127 posts · Jul 2009
To keep Atahualpa compatible with PHP 8.1 you should change the following:

in functions/bfa_ata_custom_comments.php to remove some notice level errors:
old: $comment = get_comment($comment_id);
Code:
$comment = get_comment($comment_id  ?? 0);
To remove warnings and in some cases a crash in functions.php
Remove the lines 858 to 863 - Internet Explorer 6 is long dead and there are some problems with this function. I don't think it would work anyhow so no reason in fixing it:
Code:
		if ($bfa_ata['pngfix_selectors'] != "" AND $isIE6 = TRUE) 
		{
			wp_register_script('ddroundies', $templateURI . '/js/DD_roundies.js', false, '0.0.2a' );
			wp_enqueue_script('ddroundies');
			add_action('wp_head', 'bfa_ddroundiesHead');
		}

As well as don't forget to remove line 107 (the closing ampersand) from js.php from version 3.7.26

I attach the 3 files below (cannot attach full version due to file size attachement restrictions):
Attached Files
File Type: zip atahualpa.zip (13.1 KB, 568 views)
__________________
Don't settle for lousy expensive Maps - Get free Maps based on Openstreetmap with great autorouting for cyclists, hikers and Mountainbikers at http://openmtbmap.org
  #2  
Old Jun 1, 2023, 06:21 AM
extremecarver
 
127 posts · Jul 2009
I got the following notice to change for PHP 8.2 by another user Valentin F. (he is not registered here):

In css.php lines 137&138 i had to do an int cast because of this error:
PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + int

Change from:
Quote:
$bfa_ata['layout_min'] = $bfa_ata['layout_min_width'] + ( $bfa_ata['layout_style_leftright_padding'] * 2 );
$bfa_ata['layout_max'] = $bfa_ata['layout_max_width'] + ( $bfa_ata['layout_style_leftright_padding'] * 2 );
to:
Quote:
$bfa_ata['layout_min'] = (int) $bfa_ata['layout_min_width'] + ( $bfa_ata['layout_style_leftright_padding'] * 2 );
$bfa_ata['layout_max'] = (int) $bfa_ata['layout_max_width'] + ( $bfa_ata['layout_style_leftright_padding'] * 2 );

I just updated to php 8.2 and it works flawless even though I have loads of plugins. Seem everyone done his homework by now (half a year ago upon release plenty was broken still on 8.2)
__________________
Don't settle for lousy expensive Maps - Get free Maps based on Openstreetmap with great autorouting for cyclists, hikers and Mountainbikers at http://openmtbmap.org

Last edited by extremecarver; Jun 25, 2023 at 09:18 AM.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP 7 compatibility? bswb97 Installation/Upgrade Issues 7 Aug 5, 2019 09:08 AM
PHP 7 compatibility jlbo New Versions, & Updating 3 Nov 20, 2016 02:58 PM
datafeedr compatibility bigliettaio Plugins & Atahualpa 2 Oct 9, 2014 04:50 AM
Compatibility with Simplviewer rickpm Atahualpa 3 Wordpress theme 5 Jun 16, 2011 03:21 PM


All times are GMT -6. The time now is 11:56 AM.


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