• meredithinnovaxis

    (@meredithinnovaxis)


    Our partner portal is totally down (and the website is unusable when a client is logged in) and the error message is below (replaced our site domain for privacy):

    PHP Fatal error: Uncaught ValueError: Unknown format specifier """ in /nas/content/live/example/wp-content/plugins/wp-members/includes/class-wp-members.php:1769\nStack trace:\n#0 /nas/content/live/example/wp-content/plugins/wp-members/includes/class-wp-members.php(1769): sprintf('<a href="%s">loginout_args(Array)\n#2 /nas/content/live/example/wp-content/plugins/wp-members/includes/class-wp-members-shortcodes.php(516): wpmem_loginout(Array)\n#3 /nas/content/live/example/wp-includes/shortcodes.php(356): WP_Members_Shortcodes->loginout(Array, '', 'wpmem_loginout')\n#4 [internal function]: do_shortcode_tag(Array)\n#5 /nas/content/live/example/wp-includes/shortcodes.php(228): preg_replace_callback('/\\\\[(\\\\[?)(wpmem_...', 'do_shortcode_ta...', '[wpmem_loginout...')\n#6 /nas/content/live/example/wp-content/themes/example/header/header-user.php(91): do_shortcode('[wpmem_loginout...')\n#7 /nas/content/live/example/wp-includes/template.php(772): require('/nas/content/li...')\n#8 /nas/content/live/example/wp-includes/template.php(716): load_template('/nas/content/li...', false, Array)\n#9 /nas/content/live/example/wp-includes/general-template.php(204): locate_template(Array, true, false, Array)\n#10 /nas/content/live/example/wp-content/themes/example/header.php(147): get_template_part('header/header-u...')\n#11 /nas/content/live/example/wp-includes/template.php(770): require_once('/nas/content/li...')\n#12 /nas/content/live/example/wp-includes/template.php(716): load_template('/nas/content/li...', true, Array)\n#13 /nas/content/live/example/wp-includes/general-template.php(48): locate_template(Array, true, true, Array)\n#14 /nas/content/live/example/wp-content/themes/example/portal-account-template.php(5): get_header()\n#15 /nas/content/live/example/wp-includes/template-loader.php(106): include('/nas/content/li...')\n#16 /nas/content/live/example/wp-blog-header.php(19): require_once('/nas/content/li...')\n#17 /nas/content/live/example/index.php(17): require('/nas/content/li...')\n#18 {main}\n thrown in /nas/content/live/example/wp-content/plugins/wp-members/includes/class-wp-members.php on line 1769, referer: https://www.example.com/

    Please help if you can.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    PHP 8 is more strict and so there are some things that may not throw an error in PHP 7 that will in PHP 8. This is one of those cases, and it’s in an area of the plugin that isn’t always used, so it does not get reported. In this case it’s in the “loginout” shortcode.

    In /includes/class-wp-members.php line 1769 you will see the following:

    $html = sprintf( '<a href="%s" id="%" class="%s">%s</a>', $link, $args['id'], $args['class'], $text );

    Note the id place holder is only “%” – it should be “%s” – change the line to this:

    $html = sprintf( '<a href="%s" id="%s" class="%s">%s</a>', $link, $args['id'], $args['class'], $text );

    This change is in the code for the next release, which is due out soon.

    Thread Starter meredithinnovaxis

    (@meredithinnovaxis)

    That worked, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Fatal error after PHP 8.0 update’ is closed to new replies.