From b3779388c9af31069f43cb377db4bca970f1643a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Thu, 1 Aug 2024 09:03:49 +0200 Subject: [PATCH] Suppress unavoidable Deprecated notices - Networking (#1660) --- packages/playground/wordpress/src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/playground/wordpress/src/index.ts b/packages/playground/wordpress/src/index.ts index 051b5044fb..278ca847e4 100644 --- a/packages/playground/wordpress/src/index.ts +++ b/packages/playground/wordpress/src/index.ts @@ -88,6 +88,17 @@ export async function setupPlatformLevelMuPlugins(php: UniversalPHP) { $playground_consts = array_keys($playground_consts); } set_error_handler(function($severity, $message, $file, $line) use($playground_consts) { + /** + * We're forced to use this deprecated hook to ensure SSL operations work without + * the kitchen-sink bundled. See https://github.com/WordPress/wordpress-playground/pull/1504 + * for more context. + */ + if ( + strpos($message, "Hook http_api_transports is deprecated") !== false || + strpos($message, "Hook http_api_transports is deprecated") !== false + ) { + return; + } /** * This is a temporary workaround to hide the 32bit integer warnings that * appear when using various time related function, such as strtotime and mktime.