1, 'per_page' => 10] ); $json = json_encode($payload, JSON_UNESCAPED_UNICODE | JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_INVALID_UTF8_SUBSTITUTE); return $json === false ? '{}' : $json; } catch (\Throwable $error) { // The drawer can still revalidate through its existing API path if // the optional first-page bootstrap is unavailable. return '{}'; } } }