Skip to content
Snippets Groups Projects
Commit cef096b3 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

prevent ph8 warnings, fixes #12

parent 54053632
No related branches found
No related tags found
No related merge requests found
Pipeline #33563 failed
......@@ -91,14 +91,15 @@ class ExcalidrawBlock extends BlockType
public function getFiles(): array
{
$payload = $this->getPayload();
if (!$payload['file_id'] && !$payload['folder_id']) {
if (empty($payload['file_id']) && empty($payload['folder_id'])) {
return [];
}
if ($payload['file_id']) {
if (!empty($payload['file_id'])) {
$files = [];
if ($fileRef = \FileRef::find($payload['file_id'])) {
$fileRef = \FileRef::find($payload['file_id']);
if ($fileRef) {
$files[] = $fileRef;
}
......
......@@ -22,7 +22,7 @@
<? endif ?>
<div class="excalidraw-content">
<? if ($content_bar_text) : ?>
<? if (!empty($content_bar_text)) : ?>
<?= ContentBar::get()
->setTOC(new TOCItem($content_bar_text))
->setIcon(Icon::create('content'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment