Skip to content

Commit

Permalink
PHP code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Actions Workflow committed Jun 23, 2020
1 parent 529336e commit 91d7a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Object/ResourceObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function getTitleImage(): string
if (!empty($this->properties["acdh:hasTitleImage"][0]->value)) {
if ($file = @fopen($this->config->getBaseUrl().$this->properties["acdh:hasTitleImage"][0]->value, "r")) {
$type = fgets($file, 40);
if(!empty($type)) {
if (!empty($type)) {
if (strpos(strtolower($type), 'svg') === false) {
$img = '<img src="'.$this->config->getBaseUrl().$this->properties["acdh:hasTitleImage"][0]->value.'" class="img-responsive" style="max-width: 200px;" /> ';
} else {
Expand All @@ -252,7 +252,7 @@ public function getTitleImage(): string
$img = '<img src="data:image/png;base64,'.base64_encode($imgBinary).'" class="img-responsive" style="max-width: 200px;" /> ';
}
}
}
}
}
fclose($file);
}
Expand Down

0 comments on commit 91d7a6a

Please sign in to comment.