diff --git a/themes/googleimage/views/site/index.php b/themes/googleimage/views/site/index.php index 5c8bd92..7b225c3 100644 --- a/themes/googleimage/views/site/index.php +++ b/themes/googleimage/views/site/index.php @@ -83,6 +83,10 @@ eof; if (in_array($first_img['extension'], $imgExts)) { echo << +eof; + }else { + echo << eof; } } diff --git a/themes/videoblog/controller/ListController.php b/themes/videoblog/controller/ListController.php index c219e98..0874b30 100644 --- a/themes/videoblog/controller/ListController.php +++ b/themes/videoblog/controller/ListController.php @@ -97,7 +97,7 @@ Class ListController extends Controller { 'url' => $parent['path'], ]); - $parent = !empty($menus[$parent['pid']]) ? $menus[$parent['pid']] : null; + $parent = !empty($parent['pid']) && !empty($menus[$parent['pid']]) ? $menus[$parent['pid']] : null; } return $breads; diff --git a/themes/videoblog/views/site/index.php b/themes/videoblog/views/site/index.php index a633f44..58bb4e1 100644 --- a/themes/videoblog/views/site/index.php +++ b/themes/videoblog/views/site/index.php @@ -101,6 +101,10 @@ eof; if (in_array($first_img['extension'], $imgExts)) { echo << +eof; + }else { + echo << eof; } } @@ -133,7 +137,9 @@ eof; } $duration = !empty($category['duration']) ? $category['duration'] : ''; - $snapshot = !empty($file['snapshot']) ? $file['snapshot'] : (!empty($category['snapshot']) ? $category['snapshot'] : $first_img['path']); + $snapshot = !empty($file['snapshot']) ? $file['snapshot'] : (!empty($category['snapshot']) ? $category['snapshot'] : + (!empty($first_img['path']) ? $first_img['path'] : '/img/default.png') + ); $title = !empty($category['title']) ? $category['title'] : $file['filename']; echo <<