Skip to content

Commit eb36e14

Browse files
committed
Fix PHP warnings
1 parent 3e04af3 commit eb36e14

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/WebApp/BootstrapTheme/ImageCarouselRenderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ public function renderChildren() {
3030
foreach ($images AS $image) {
3131
$active = $idx == 0 ? 'active' : '';
3232
$nav .= '<li data-target="#'.$id.'" data-slide-to="'.$idx.'" class="'.$active.'"></li>';
33-
$title = htmlentities($image->image->getTitle());
33+
$title = $image->image->getTitle();
34+
if ($title != NULL) $title = htmlentities($title);
3435
$inner .= '<div class="carousel-item '.$active.'">'.
3536
'<img src="'.$image->image->getUrl().'" class="d-block w-100" alt="'.$title.'" title="'.$title.'">';
3637
if ($image->title || $image->description) {

src/WebApp/Component/ImageCarousel.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public function __construct($parent) {
1313

1414
public function addImage($image, $title = NULL, $description = NULL) {
1515
$img = new \stdClass;
16-
$img->image = is_string($image) ? new Image($this, $image, $title) : $image;
17-
$img->title = $title;
18-
$img->descripton = $description;
19-
$this->images[] = $img;
16+
$img->image = is_string($image) ? new Image($this, $image, $title) : $image;
17+
$img->title = $title;
18+
$img->description = $description;
19+
$this->images[] = $img;
2020
}
2121

2222
public function getImages() {

0 commit comments

Comments
 (0)