• WordPress 6.1.1, WP-Property Version 2.4.2, no other plugins active. When I try and set the host (Ionos) to PHP 8 or 8.1 I get a fatal error:

    Fatal error: Array and string offset access syntax with curly braces is no longer supported in /homepages/23/d630601373/htdocs/a-tri-site/wordpress/wp-content/plugins/wp-property/lib/class_functions.php on line 1050
    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    Switching back to PHP 7.4 and all is fine. Any thoughts?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Since they’re no longer maintaining this plugin, I had to go through and make a fix for each error that came up. I of course didn’t make a list as I went like I should’ve. For this first one, you need to go to that file and change line 1050 to this: $current = ord($value[$i]);

    For each you fix, another will pop up and most of them are changing the curly brackets { } to this style bracket [ ] in the line of code. I “think” there were 5 files that needed fixes.

    Thread Starter tomf2468

    (@tomf2468)

    I wasn’t aware the plugin had been orphaned! The first fix work as you described, but I got stuck at the second fix. Do you have any memory of this??

    Fatal error: Uncaught ValueError: Unknown format specifier “t” in /Users/tomferguson/Sites/km-tri-cities/wordpress/wp-content/plugins/wp-property/l10n.php:50 Stack trace: #0 /Users/tomferguson/Sites/km-tri-cities/wordpress/wp-content/plugins/wp-property/l10n.php(50): sprintf(‘Showing % to % …’, ‘0’, ‘0’, ‘0’) #1 /Users/tomferguson/Sites/km-tri-cities/wordpress/wp-content/plugins/wp-property/lib/class_core.php(1356): include(‘/Users/tomfergu…’) 

    l10n Line 50 is
    ‘showing_entries_null’ => sprintf( __( ‘Showing % to % of % entries’, ud_get_wp_property()->domain ), ‘0’, ‘0’, ‘0’ ),

    Which is part of

    //** Datatables Library */
    ‘dtables’ => array(
    ‘first’ => ( ‘First’, ud_get_wp_property()->domain ), ‘previous’ => ( ‘Previous’, ud_get_wp_property()->domain ),
    ‘next’ => ( ‘Next’, ud_get_wp_property()->domain ), ‘last’ => ( ‘Last’, ud_get_wp_property()->domain ),
    ‘processing’ => ( ‘Processing…’, ud_get_wp_property()->domain ), ‘show_menu_entries’ => sprintf( ( ‘Show %s entries’, ud_get_wp_property()->domain ), ‘MENU‘ ),
    ‘no_m_records_found’ => ( ‘No matching records found’, ud_get_wp_property()->domain ), ‘no_data_available’ => ( ‘No data available in table’, ud_get_wp_property()->domain ),
    ‘loading’ => ( ‘Loading…’, ud_get_wp_property()->domain ), ‘showing_entries’ => sprintf( ( ‘Showing %s to %s of %s entries’, ud_get_wp_property()->domain ), ‘START‘, ‘END‘, ‘TOTAL‘ ),
    ‘showing_entries_null’ => sprintf( ( ‘Showing % to % of % entries’, ud_get_wp_property()->domain ), ‘0’, ‘0’, ‘0’ ), ‘filtered_from_total’ => sprintf( ( ‘(filtered from %s total entries)’, ud_get_wp_property()->domain ), ‘MAX‘ ),
    ‘search’ => ( ‘Search:’, ud_get_wp_property()->domain ), ‘display’ => ( ‘Display:’, ud_get_wp_property()->domain ),
    ‘records’ => ( ‘records’, ud_get_wp_property()->domain ), ‘all’ => ( ‘All’, ud_get_wp_property()->domain ),
    ),

    class_core line 1356 is
    include( $l10n_dir );

    Which is part of
    public function get_l10n_data() {
    $l10n = array();
    //** Include the list of translations */
    $l10n_dir = ud_get_wp_property()->path( ‘l10n.php’, ‘dir’ );
    include( $l10n_dir );
    /** All additional localizations must be added using the filter below. */
    $l10n = apply_filters( ‘wpp::js::localization’, $l10n );
    foreach( (array)$l10n as $key => $value ) {
    if( !is_scalar( $value ) ) {
    continue;
    }
    $l10n[ $key ] = html_entity_decode( (string)$value, ENT_QUOTES, ‘UTF-8’ );
    }
    return $l10n;
    }

    This one had a lot of changes needed and I couldn’t get it working by just going through making fixes. I copied a new file from the wordpress core in it’s place. It’s here:

    https://core.trac.wordpress.org/browser/trunk/src/wp-includes/l10n.php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Failure going from PHP 7.4 to PHP 8.1’ is closed to new replies.