[wp-trac] [WordPress Trac] #46550: Uncaught TypeError: setcookie() expects parameter 5 to be string, bool given in...
WordPress Trac
noreply at wordpress.org
Tue Oct 10 10:50:15 UTC 2023
#46550: Uncaught TypeError: setcookie() expects parameter 5 to be string, bool
given in...
-------------------------------------------------+-------------------------
Reporter: kmvan | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: Networks and Sites | Version: 5.2
Severity: minor | Resolution:
Keywords: has-patch has-testing-info changes- | Focuses: coding-
requested | standards
-------------------------------------------------+-------------------------
Comment (by jrf):
> I do wonder if there are any BC concerns. Discovering instances in the
wild that do check for false might be better served during the alpha
phase, rather in the latest stage of beta cycle.
Well, my gut feeling says that issues resulting from the BC-break would be
very rare and most likely would point to code which needs love anyway.
The typical usages of this constant will likely be:
* Check if it is `defined()` and `define()` if not (= no value check).
* Passing it to something like `set_cookie()` (= no value check).
* Checking whether a cookie is valid for a given domain. This would
involve a value check but most likely one where a cookie domain is
compared against the constant. A cookie domain of `false` or `''` will
both result in a cookie being invalid when compared to an actual cookie
domain, so this would not result in a behavioural change.
Having said that, I agree a late beta stage is probably not the best time
to validate a gut feeling ;-)
It would be nice if the patch could get updated based on the previously
given feedback so it is ready to be committed for 6.5 early.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46550#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list