diff options
| author | Developer | 2026-06-27 03:29:31 +0200 |
|---|---|---|
| committer | Developer | 2026-06-27 03:29:31 +0200 |
| commit | 174df4c182311642779a30bfca944f0699c93ab9 (patch) | |
| tree | b55e1417b1a2f0bb33d45268512e15bafdbf048c /resources | |
| parent | 8f43d48714a7346d0730145a8ab209c0ff8bc8fe (diff) | |
| download | curious-174df4c182311642779a30bfca944f0699c93ab9.tar.gz | |
fix: handle empty poster_url strings as missing poster
poster_url can be empty string instead of null, so use empty() instead of is_null() in cinema, cinema_show, and genre_movies views.
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/cinema.blade.php | 2 | ||||
| -rw-r--r-- | resources/views/cinema_show.blade.php | 2 | ||||
| -rw-r--r-- | resources/views/genre_movies.blade.php | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/resources/views/cinema.blade.php b/resources/views/cinema.blade.php index baa0802..af09b91 100644 --- a/resources/views/cinema.blade.php +++ b/resources/views/cinema.blade.php @@ -122,7 +122,7 @@ html { @foreach( $movies as $movie) <div class="card movie-card"> <a href="{{ route('cinema.show', $movie->imdb_id) }}"> - @if ( ! is_null($movie->poster_url) ) + @if ( ! empty($movie->poster_url) ) <img class="poster" src="{{ $movie->poster_url }}" alt="{{ $movie->primary_title }} poster" loading="lazy"> @else <div class="no-poster">🎬</div> diff --git a/resources/views/cinema_show.blade.php b/resources/views/cinema_show.blade.php index 8379a59..5a3d262 100644 --- a/resources/views/cinema_show.blade.php +++ b/resources/views/cinema_show.blade.php @@ -47,7 +47,7 @@ <div class="card-body"> <div class="row"> <div class="col-md-3"> - @if ( ! is_null($movie->poster_url) ) + @if ( ! empty($movie->poster_url) ) <img class="poster-detail" src="{{ $movie->poster_url }}" alt="{{ $movie->primary_title }} poster"> @else <div class="no-poster">🎬</div> diff --git a/resources/views/genre_movies.blade.php b/resources/views/genre_movies.blade.php index 05f8ca3..a8a4585 100644 --- a/resources/views/genre_movies.blade.php +++ b/resources/views/genre_movies.blade.php @@ -104,7 +104,7 @@ html { @foreach( $movies as $movie) <div class="card movie-card"> <a href="{{ route('cinema.show', $movie->imdb_id) }}"> - @if ( ! is_null($movie->poster_url) ) + @if ( ! empty($movie->poster_url) ) <img class="poster" src="{{ $movie->poster_url }}" alt="{{ $movie->primary_title }} poster" loading="lazy"> @else <div class="no-poster">🎬</div> |
