함수에서 값이 넘어오지 않았을 때 예외처리 추가

This commit is contained in:
chicpro
2013-02-22 10:31:48 +09:00
parent b02202efe7
commit dabd12bc9d

View File

@ -32,6 +32,9 @@ function get_view_thumbnail($contents)
// $contents 중 img 태그 추출
$matchs = get_editor_image($contents);
if(!$matchs)
return $contents;
for($i=0; $i<count($matchs[1]); $i++) {
// 이미지 path 구함
$imgurl = parse_url($matchs[1][$i]);