diff --git a/system/includes/functions.php b/system/includes/functions.php index 68d7e72..e3913e1 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -36,8 +36,10 @@ function get_post_sorted(){ $tmp = glob('content/*/blog/*.md', GLOB_NOSORT); - foreach($tmp as $file) { - $_cache[] = pathinfo($file); + if (is_array($tmp)) { + foreach($tmp as $file) { + $_cache[] = pathinfo($file); + } } }