From 2949af2922d711fe9f063d2aada07ec9ed3a7907 Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Thu, 30 Jan 2014 15:09:19 +0700 Subject: [PATCH] Suppress error Suppress error on some of Linux distro. --- system/includes/functions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); + } } }