From 52a8359160b7ebd1ff211d1dee3492d66d340b4f Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 12 Apr 2019 19:09:34 +0300 Subject: [PATCH] Fix E_NOTICES --- src/ParsedownHighlight.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ParsedownHighlight.php b/src/ParsedownHighlight.php index 800e9e0..85859a3 100644 --- a/src/ParsedownHighlight.php +++ b/src/ParsedownHighlight.php @@ -17,6 +17,10 @@ public function __construct() protected function blockFencedCodeComplete($block) { + if (!isset($block['element']['element']['attributes'])) { + return $block; + } + $code = $block['element']['element']['text']; $languageClass = $block['element']['element']['attributes']['class']; $language = explode('-', $languageClass);