X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/37dbd7898c9c0baf9aec5073b757e3205a6a0c3d..7b2536e0bef980a9d153522320c14dc5261b4ba4:/page.php diff --git a/page.php b/page.php index c6eee87..290a596 100644 --- a/page.php +++ b/page.php @@ -26,7 +26,12 @@ function getoutput($blocks = []) '< \[\[ ([^]]*) \]\] >x', function ($sub) use ($blocks) { list ($placeholder, $name) = $sub; - $html = $blocks[$name]; + if (isset($blocks[$name])) { + $html = $blocks[$name]; + } + else { + $html = ''.$name.' ontbreekt'; + } return sprintf('%s', is_numeric($name) ? '' : $placeholder, # edit replacement preg_replace('{}', '', $html) # contents