Index: /trunk/xpressme_integration_kit/include/xpress_render.php
===================================================================
--- /trunk/xpressme_integration_kit/include/xpress_render.php	(revision 430)
+++ /trunk/xpressme_integration_kit/include/xpress_render.php	(revision 431)
@@ -11,7 +11,8 @@
 
 	$pattern = "<head[^>]*?>(.*)<\/head>";
-	preg_match("/".$pattern."/s",  $body_cut, $head_matches);
-	$head_str = $head_matches[1];
-	
+	$head_str = '';
+	if (preg_match("/".$pattern."/s",  $body_cut, $head_matches)){
+		$head_str = $head_matches[1];
+	}
 	$pattern = '<head[^>]*?>';
 	$head_str = preg_replace("/".$pattern."/s" , '' , $head_str);
@@ -51,6 +52,8 @@
 {
 	$pattern = '<title[^>]*?>(.*)<\s*\/\s*title\s*>';
-	preg_match("/".$pattern."/i",  $contents, $head_matches);
-	$title_str = $head_matches[1];
+	$title_str = '';
+	if (preg_match("/".$pattern."/i",  $contents, $head_matches)){
+		$title_str = $head_matches[1];
+	}
 	return $title_str;
 }
@@ -59,6 +62,8 @@
 {
 	$pattern = '<\s*meta\s+name\s*=\s*["\']' . $name . '["\']\s*content\s*=\s*[\'"](.*)[\'"]\s*\/\s*>';
-	preg_match("/".$pattern."/i",  $contents, $head_matches);
-	$meta = $head_matches[1];
+	$meta = '';
+	if (preg_match("/".$pattern."/i",  $contents, $head_matches)){
+		$meta = @$head_matches[1];
+	}
 	return $meta;
 }
@@ -89,7 +94,8 @@
 	$xpess_config = new XPressME_Class();
 	$pattern = "<body[^>]*?>(.*)<\/body>";
-	preg_match("/".$pattern."/s",  $contents, $body_matches);
-	$body = $body_matches[1];
-
+	$body = '';
+	if(preg_match("/".$pattern."/s",  $contents, $body_matches)){
+		$body = $body_matches[1];
+	}
 	if (!$xpess_config->is_theme_sidebar_disp){
 		$side_panel = get_sidebar_rander();
@@ -216,6 +222,6 @@
 	$xpress_data['body_contents'] = get_body($contents);
 	// used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position
-	$xpress_data['left_post_link'] = $GLOBALS['left_arrow_post_link'];
-	$xpress_data['right_post_link'] = $GLOBALS['right_arrow_post_link'];
+	$xpress_data['left_post_link'] = @$GLOBALS['left_arrow_post_link'];
+	$xpress_data['right_post_link'] = @$GLOBALS['right_arrow_post_link'];
 	$xpress_data['left_posts_link'] =  str_replace('&laquo;','',xpress_left_arrow_posts_link('echo=0'));
 	$xpress_data['right_posts_link'] = str_replace('&raquo;','',xpress_right_arrow_posts_link('echo=0'));
