Skip to content

Commit 83805e4

Browse files
Resolve PHP 8.1 warning for rtrim() in functions.php (#189)
* Resolve PHP 8.1 warning for rtrim() in functions.php * update changelog and add props --------- Co-authored-by: Chris Reynolds <[email protected]>
1 parent 6f750fb commit 83805e4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.34.0 ()
2+
* Resolves rtrim warning in PHP 8.1+ environments. ([#189](https://github.com/pantheon-systems/wordpress-composer-managed/pull/189)) props @mattmacneil
3+
14
### v1.33.0 (2025-05-08)
25
* Fixes an issue where we were running `maybe-add-symlinks` but the script didn't exist. ([#183](https://github.com/pantheon-systems/wordpress-composer-managed/pull/183))
36
* Fixes an issue where WP REST API urls would break on new sites before "pretty permalink" structure was set. ([#186](https://github.com/pantheon-systems/wordpress-composer-managed/pull/186))

web/app/mu-plugins/filters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function fix_core_resource_urls( string $url ) : string {
5252
$main_site_url = trailingslashit( is_multisite() ? network_site_url( '/' ) : home_url() );
5353

5454
// Get the current site path. Covers a variety of scenarios since we're using this function on a bunch of different filters.
55-
$current_site_path = trailingslashit( parse_url( get_home_url(), PHP_URL_PATH ) ); // Define a default path.
55+
$current_site_path = trailingslashit( parse_url( get_home_url(), PHP_URL_PATH ) ?? '' ); // Define a default path.
5656
if ( is_multisite() ) {
5757
if ( isset( $current_blog ) && ! empty( $current_blog->path ) ) {
5858
$current_site_path = trailingslashit( $current_blog->path );

0 commit comments

Comments
 (0)