Skip to content

Commit

Permalink
Suppress unavoidable Deprecated notices - Networking (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel authored Aug 1, 2024
1 parent e862cde commit b377938
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/playground/wordpress/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <strong>deprecated</strong>") !== 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.
Expand Down

0 comments on commit b377938

Please sign in to comment.