[wp-trac] [WordPress Trac] #57522: PHP 8.2 > Backend fatal error: PHP Fatal error: Uncaught TypeError

WordPress Trac noreply at wordpress.org
Sat Jan 21 22:11:21 UTC 2023


#57522: PHP 8.2 > Backend fatal error: PHP Fatal error:  Uncaught TypeError
---------------------------------+------------------------------
 Reporter:  mackaaij             |       Owner:  (none)
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  General              |     Version:  6.1.1
 Severity:  normal               |  Resolution:
 Keywords:  needs-testing php82  |     Focuses:
---------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-testing => needs-testing php82


Old description:

> I tried to upgrade to PHP 8.2 and my site displayed a critical error.
> Downgraded and found this in the error log. I'm not sure which component
> this applies to. Happy to look for more info when needed.
>
> [Sat Jan 21 18:55:25.535143 2023] [lsapi:error] [pid 2731617:tid
> 140286197896960] [client [redacted]:61727] [host ] Backend fatal error:
> PHP Fatal error:  Uncaught TypeError: session_start(): Argument #1
> ($options) must be of type array, string given in [redacted]/wp-includes
> /class-wp-hook.php:308\nStack trace:\n#0 [redacted]/wp-includes/class-wp-
> hook.php(308): session_start()\n#1 [redacted]/wp-includes/class-wp-
> hook.php(332): WP_Hook->apply_filters()\n#2 [redacted]/wp-
> includes/plugin.php(517): WP_Hook->do_action()\n#3 [redacted]/wp-
> settings.php(617): do_action()\n#4 [redacted]/wp-config.php(86):
> require_once('[redacted]...')\n#5 [redacted]/wp-load.php(50):
> require_once('[redacted]...')\n#6 [redacted]/wp-blog-header.php(13):
> require_once('[redacted]...')\n#7 [redacted]/index.php(17):
> require('[redacted]...')\n#8 {main}\n  thrown in [redacted]/wp-includes
> /class-wp-hook.php on line 308\n

New description:

 I tried to upgrade to PHP 8.2 and my site displayed a critical error.
 Downgraded and found this in the error log. I'm not sure which component
 this applies to. Happy to look for more info when needed.
 {{{
 [Sat Jan 21 18:55:25.535143 2023] [lsapi:error] [pid 2731617:tid
 140286197896960]
 [client [redacted]:61727] [host ] Backend fatal error: PHP Fatal error:
 Uncaught TypeError: session_start():
 Argument #1 ($options) must be of type array, string given in [redacted
 ]/wp-includes/class-wp-hook.php:308\n
 Stack trace:\n
 #0 [redacted]/wp-includes/class-wp-hook.php(308): session_start()\n
 #1 [redacted]/wp-includes/class-wp-hook.php(332):
 WP_Hook->apply_filters()\n
 #2 [redacted]/wp-includes/plugin.php(517): WP_Hook->do_action()\n
 #3 [redacted]/wp-settings.php(617): do_action()\n
 #4 [redacted]/wp-config.php(86): require_once('[redacted]...')\n
 #5 [redacted]/wp-load.php(50): require_once('[redacted]...')\n
 #6 [redacted]/wp-blog-header.php(13): require_once('[redacted]...')\n
 #7 [redacted]/index.php(17): require('[redacted]...')\n
 #8 {main}\n  thrown in [redacted]/wp-includes/class-wp-hook.php on line
 308\n
 }}}

--

Comment:

 Hi there, welcome back to WordPress Trac! Thanks for the report.

 Based on the error log, the issue comes from a `session_start()` call with
 an incorrect `$options` parameter (a string instead of an array).
 WordPress core does not use that function, so it's likely called in a
 plugin or theme.

 Does the issue still happen with all plugins disabled and a default theme
 (Twenty Twenty-Three) activated?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57522#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list