Opened 15 months ago
Closed 5 weeks ago
#8920 closed enhancement (fixed)
customizer_set_uri can cause depreciation notice in PHP 8.1
Reported by: | thomaslhotta | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 14.1.0 | Priority: | low |
Severity: | minor | Version: | 11.2.0 |
Component: | Templates | Keywords: | has-patch |
Cc: |
Description
Hi
In the function customizer_set_uri
on line 693 the 'query'
key of $uri
can be empty. If that is the case, a depreciation notice will be emitted.
I think the best solution would be to change the preceding else statement to an
else if ( ! empty( $uri['query'] ) {
because if the query key is empty the rest of the functionality does nothing anyway.
Change History (13)
#1
@
3 months ago
- Milestone changed from Awaiting Review to Up Next
- Owner set to espellcaste
- Severity changed from normal to minor
- Status changed from new to assigned
This ticket was mentioned in PR #339 on buddypress/buddypress by renatonascalves.
2 months ago
#3
- Keywords has-patch added
#4
@
2 months ago
- Priority changed from normal to low
- Type changed from defect (bug) to enhancement
This is a tricky one. The related method was deprecated since BuddyPress 12.0. But it is available in BuddyPress 11.2.0, which is where the issue is occurring.
We have a fix available here. But this fix is useless since mentioned, the code is deprecated in the latest version of BuddyPress.
I'd argue that we should not backport this to BP 11.2.0 since this is not a security issue, and advocate @thomaslhotta to upgrade BuddyPress instead.
But if we decide to backport this to 11, we have the patch here.
#6
@
7 weeks ago
I agree with you @espellcaste, let's avoid the deprecated notice in 15.0 and up if people are still using this method although it's deprecated.
#7
@
7 weeks ago
@imath This is an internal method used by the BP_Nouveau
class, so the issue is not that external people are using it.
The issue happens in a previous version of BuddyPress (11.2.0), but since it was deprecated, the reported error is gone since the method is not used anymore internally.
I'd suggest removing the method in 15.0 rather than patch it.
#9
@
5 weeks ago
I disagree! My bad, here's the explanation: https://github.com/buddypress/buddypress/pull/339/commits/0a65d4a790af65b6b693bb0ad1faaa69140f9af0
It's probably best to fix this earlier than 15.0.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8920