--- include/export.inc.php.orig	2010-12-15 13:08:26.000000000 -0500
+++ include/export.inc.php	2010-12-15 13:08:31.000000000 -0500
@@ -856,7 +856,7 @@
 
 							$result = CTemplate::update($host_db);
 							if(!$result){
-								throw new APIException(1, CTemplate::resetErrors);
+								throw new APIException(1, CTemplate::resetErrors());
 							}
 							
 							$options = array(
--- api/classes/class.ctemplate.php.orig	2010-12-15 13:07:30.000000000 -0500
+++ api/classes/class.ctemplate.php	2010-12-15 13:07:55.000000000 -0500
@@ -1007,7 +1007,7 @@
 
 			foreach($templates as $tnum => $template){
 				$template['templates_link'] = isset($template['templates']) ? $template['templates'] : null;
-				$template['templates'] = $template;
+				$template['templates'] = (array) $template;
 
 				$result = self::massUpdate($template);
 				if(!$result) throw new APIException(ZBX_API_ERROR_PARAMETERS, 'Failed to update template');
