Skip to content

Commit 24b3171

Browse files
committed
Improve variable assignment location
1 parent e6029bb commit 24b3171

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/wp-includes/template.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,9 +1015,8 @@ static function ( int $level, string $message, ?string $file = null, ?int $line
10151015
*/
10161016
$filtered_output = (string) apply_filters( 'wp_template_enhancement_output_buffer', $filtered_output, $output );
10171017
} catch ( Exception $exception ) {
1018-
$did_just_catch_exception = true;
1019-
10201018
// Emit to the error log as a warning not as an error to prevent halting execution.
1019+
$did_just_catch_exception = true;
10211020
trigger_error(
10221021
sprintf(
10231022
/* translators: %s is the exception class name */
@@ -1026,8 +1025,8 @@ static function ( int $level, string $message, ?string $file = null, ?int $line
10261025
) . ' ' . $exception->getMessage(),
10271026
E_USER_WARNING
10281027
);
1028+
$did_just_catch_exception = false;
10291029
}
1030-
$did_just_catch_exception = false;
10311030

10321031
if ( $display_errors ) {
10331032
foreach ( $error_log as $error ) {

0 commit comments

Comments
 (0)