From 0d17335392d78b12b3e7e6b519cd53db728df52a Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 10 Jul 2026 02:38:55 +0000 Subject: [PATCH] Building 7.0.1 --- includes/utils.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/utils.php b/includes/utils.php index 014f4b8..a7c4466 100644 --- a/includes/utils.php +++ b/includes/utils.php @@ -432,10 +432,17 @@ function dmp_filter( $a ) { return $a; } -function get_echo( $callback, $args = array() ) { +/** + * Gets the output buffer for invoking the provided callback. + * + * @param callable $callback Callback. + * @param mixed[] $args Arguments. + * @return string Captured output. + */ +function get_echo( callable $callback, array $args = array() ): string { ob_start(); call_user_func_array( $callback, $args ); - return ob_get_clean(); + return (string) ob_get_clean(); } // Recursively generate some quick assertEquals() tests based on an array.