• Resolved burnuser

    (@burnuser)


    I’m checking the possibility for an upgrade of my homepage from PHP 7.4 to 8.1

    All on Apache server, Theme: Twenty Sixteen:

    In a separate, new created online testing environment an upgrade from PHP 7.4 to 8.1 works with OMGF active. (But only there!)

    In two local staging environments (Laragon + Local) an upgrade to PHP 8.0 or 8.1 results in an error (domain removed from log-lines):

    Warning: Array to string conversion in \wp-includes\formatting.php on line 1098

    > {main}( )
    > require_once( \wp-admin\admin.php )
    > require_once( \wp-load.php )
    > require_once( \wp-config.php )
    > require_once( \wp-settings.php )
    > include_once( \wp-content\plugins\host-webfonts-local\host-webfonts-local.php )
    > omgf_init( )
    > OMGF->__construct( )
    > OMGF->define_constants( )
    > OMGF->esc_array( $array = ['merriweather' => ['subset_family' => 'Merriweather', 'subset_font' => 'merriweather', 'available_subsets' => [...], 'selected_subsets' => [...], 'used_styles' => [...]], 'montserrat' => ['subset_family' => 'Montserrat', 'subset_font' => 'montserrat', 'available_subsets' => [...], 'selected_subsets' => [...], 'used_styles' => [...]], 'inconsolata' => ['subset_family' => 'Inconsolata', 'subset_font' => 'inconsolata', 'available_subsets' => [...], 'selected_subsets' => [...], 'used_styles' => [...]]] )
    > esc_attr( $text = [‘subset_family’ => ‘Montserrat’, ‘subset_font’ => ‘montserrat’, ‘available_subsets’ => [0 => ‘latin’, 1 => ‘latin-ext’], ‘selected_subsets’ => [0 => ‘latin’, 1 => ‘latin-ext’], ‘used_styles’ => [0 => ‘400’, 1 => ‘700’]] )
    > wp_check_invalid_utf8( $string = [‘subset_family’ => ‘Montserrat’, ‘subset_font’ => ‘montserrat’, ‘available_subsets’ => [0 => ‘latin’, 1 => ‘latin-ext’], ‘selected_subsets’ => [0 => ‘latin’, 1 => ‘latin-ext’], ‘used_styles’ => [0 => ‘400’, 1 => ‘700’]], $strip = ??? )

    I don’t know how to resolve this problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter burnuser

    (@burnuser)

    Found a workaround

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Alright! Mind sharing what the workaround is?

    Either way, I’ll look into this Monday to see if I can find what might’ve caused it.

    Could you share a screenshot of the Optimize Local Fonts section?

    Thread Starter burnuser

    (@burnuser)

    Well, I was not able to resolve the problem within PHP 8.1:
    Could not work within WordPress with active OMGF, because it killed WP on Login (error stated above).
    Deleting the OMGF Plugin folder on the server brought WordPress back to life.
    But reinstalling OMGF and activating it, … killed WP again.
    Arghhhh!

    So, after a phase of frustration, I tried another way.
    I switched back to PHP 7.4
    Everything works without any problem.
    In OMGF I cleared the cache.
    Than deactivated and deleted OMGF within WP.
    Exit WP
    Switched back to PHP 8.1
    Login WP
    Actualised Permalinks
    Fresh Install of OMGF
    Now it works.

    Maybe it’s overdone and less steps or something else would helped, but I can live with my solution.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    That’s super helpful. Thanks a lot, I’ll look into this!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Btw. I think the shorter route would’ve been:

    • switch to PHP 7.4
    • Empty cache
    • Switch to PHP 8.1

    I’m pretty sure the issue way caused by data (the array) from your database. But, I’ve enough to go on for now. So thanks!

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    I’ve found what the issue was, and it’ll be fixed in the next release. Thanks for notifying me of this and helping me debug!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with upgrade to PHP 8.1’ is closed to new replies.