t3solution / t3sbootstrap

Startup extension to use bootstrap 5 classes, components and more out of the box.
GNU General Public License v2.0
24 stars 20 forks source link

MediaViewHelper fails with single value srcset attributes #314

Open martinlipp opened 1 year ago

martinlipp commented 1 year ago

The explode() call here https://github.com/t3solution/t3sbootstrap/blob/8f58e96e0adb790cd198be79aec0dfaf0dd23dbb/Classes/ViewHelpers/MediaViewHelper.php#L182 can fail with a TypeError, when only a single value is set in the srcset attribute (f.e. 'srcset': '575'). $breakpoint['srcset'] are integer values in that cases, they need to be cast to strings. This happens since strict typing was enabled (since 5.2.9).

t3solution commented 1 year ago

BUGFIX: https://github.com/t3solution/t3sbootstrap/commit/e848dff0a81cc988ec59f4d880cf4c3bc06fa863