diff --git a/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php b/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php index 1d1ca1f1..460fd24b 100644 --- a/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php +++ b/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php @@ -13,6 +13,12 @@ use Thunder\Shortcode\Shortcode\ShortcodeInterface; if ($flextype->container('registry')->get('flextype.settings.shortcode.shortcodes.entries.enabled')) { // Shortcode: [entries_fetch id="entry-id" field="field-name" default="default-value"] $flextype->container('shortcode')->addHandler('entries_fetch', static function (ShortcodeInterface $s) use ($flextype) { - return Arrays::get($flextype->container('entries')->fetch($s->getParameter('id')), $s->getParameter('field'), $s->getParameter('default')); + if ($s->getParameter('id') != null && + $s->getParameter('field') != null && + $s->getParameter('default') != null) { + return Arrays::get($flextype->container('entries')->fetch($s->getParameter('id')), $s->getParameter('field'), $s->getParameter('default')); + } + + return ''; }); }