Skip to content

Commit 7fb1962

Browse files
Additional type casting fixes
Co-authored-by: Weston Ruter <[email protected]>
1 parent aecb3de commit 7fb1962

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/auto-sizes/includes/improve-calculate-sizes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ function auto_sizes_filter_render_block_context( array $context, array $block ):
278278
$alignment = $block['attrs']['align'] ?? '';
279279

280280
// If the container block doesn't have alignment, it's assumed to be 'default'.
281-
if ( ! (bool) $alignment ) {
281+
if ( '' === $alignment ) {
282282
$context['max_alignment'] = 'default';
283-
} elseif ( 'wide' === $block['attrs']['align'] ) {
283+
} elseif ( 'wide' === $alignment ) {
284284
$context['max_alignment'] = 'wide';
285285
}
286286
}

0 commit comments

Comments
 (0)