Changes between Initial Version and Version 1 of Ticket #63403
- Timestamp:
- 05/07/2025 04:18:09 AM (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #63403
-
Property
Status
changed from
newtoclosed -
Property
Version
changed from
trunkto -
Property
Resolution
changed from
toduplicate -
Property
Milestone
changed from
Awaiting Reviewto
-
Property
Status
changed from
-
Ticket #63403 – Description
initial v1 1 1 2 2 3 Without this modification, some plugins like username-updater (Easy Username Updater) may try to do something like call add_submenu_page(null, ...)which can result in an error like this filling up logs:3 Without this modification, some plugins like username-updater (Easy Username Updater) may try to do something like call `add_submenu_page(null, ...)` which can result in an error like this filling up logs: 4 4 5 str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated 5 `str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated` 6 6 7 It stands to reason that a normalized null/false/empty path is still null/false/empty (or maybe an empty string) and we should just guard whiny functions like str_replaceagainst unexpected input.7 It stands to reason that a normalized null/false/empty path is still null/false/empty (or maybe an empty string) and we should just guard whiny functions like `str_replace` against unexpected input. 8 8 9 9 Github PR: https://github.com/WordPress/WordPress/pull/749 … … 11 11 Patch: 12 12 13 From 7ed4124a7fc69fe1edcda31b764f2e776f6fdd4c Mon Sep 17 00:00:00 2001 14 From: zyphlar <zyphlar@users.noreply.github.com> 15 Date: Tue, 6 May 2025 15:25:49 -0700 16 Subject: [PATCH] Handle null/falsy paths in wp_normalize_path without warnings 17 18 Without this modification, some plugins like username-updater (Easy Username Updater) may try to do something like call `add_submenu_page(null, ...)` which can result in an error like this filling up logs: 19 20 `str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated` 21 22 It stands to reason that a normalized null/false/empty path is still null/false/empty (or maybe an empty string) and we should just guard whiny functions like str_replace against unexpected input. 23 --- 24 wp-includes/functions.php | 4 ++++ 25 1 file changed, 4 insertions(+) 26 13 {{{ 27 14 diff --git a/wp-includes/functions.php b/wp-includes/functions.php 28 15 index 33b775e7182..5ffcaf432e5 100644 … … 45 32 46 33 if ( wp_is_stream( $path ) ) { 34 }}}