[wp-trac] [WordPress Trac] #46550: Uncaught TypeError: setcookie() expects parameter 5 to be string, bool given in...

WordPress Trac noreply at wordpress.org
Tue Apr 16 16:51:00 UTC 2024


#46550: Uncaught TypeError: setcookie() expects parameter 5 to be string, bool
given in...
-------------------------------------------------+-------------------------
 Reporter:  kmvan                                |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.6
Component:  Networks and Sites                   |     Version:  5.2
 Severity:  minor                                |  Resolution:  fixed
 Keywords:  has-patch has-testing-info early     |     Focuses:  coding-
  needs-testing                                  |  standards
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58011" 58011]:
 {{{
 #!CommitTicketReference repository="" revision="58011"
 Users: Set the default value of `COOKIE_DOMAIN` to an empty string.

 This matches the type expected by the `setcookie()` function for the
 `$domain` parameter, and resolves a fatal error if `strict_types` is
 enabled.

 Reference: [https://www.php.net/setcookie PHP Manual: setcookie()].

 Follow-up to [2725], [6434], [12732], [13062].

 Props kmvan, rajinsharwar, jrf, desrosj, Cybr, nicolefurlan, oglekler,
 hellofromTonya, kirasong, chaion07, mukesh27.
 Fixes #46550.
 }}}

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


More information about the wp-trac mailing list