From 94b1479a4915880b7f91039b2cbf442a5a48df7f Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 14 Jul 2023 20:59:26 +0000 Subject: [PATCH] Editir: Fix open_basedir warnings on the classic Edit Post screen when additional TinyMCE plugins are used. Props: rembem, MadtownLems, njsamsatli, sabernhardt, azaozz. Fixes: #54354. Built from https://develop.svn.wordpress.org/trunk@56235 git-svn-id: http://core.svn.wordpress.org/trunk@55747 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 8 ++++++-- wp-includes/version.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 8e661120a7..bd73540bc9 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -511,9 +511,13 @@ final class _WP_Editors { // Try to load langs/[locale].js and langs/[locale]_dlg.js. if ( ! in_array( $name, $loaded_langs, true ) ) { $path = str_replace( content_url(), '', $plugurl ); - $path = WP_CONTENT_DIR . $path . '/langs/'; + $path = realpath( WP_CONTENT_DIR . $path . '/langs/' ); - $path = trailingslashit( realpath( $path ) ); + if ( ! $path ) { + continue; + } + + $path = trailingslashit( $path ); if ( @is_file( $path . $mce_locale . '.js' ) ) { $strings .= @file_get_contents( $path . $mce_locale . '.js' ) . "\n"; diff --git a/wp-includes/version.php b/wp-includes/version.php index 791580cf5c..5136a0c420 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-beta4-56234'; +$wp_version = '6.3-beta4-56235'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.