Skip to content
This repository
Browse code

MINOR User error was assuming $templateList is always an array when i…

…t can also be a string.
  • Loading branch information...
commit 0a3de455cf6f1b5e37eac3b9250596a03278e930 1 parent fece61c
Frank Mullenger authored chillu committed

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  view/SSViewer.php
6  view/SSViewer.php
@@ -326,8 +326,12 @@ public function __construct($templateList) {
326 326
 			);
327 327
 		}
328 328
 
329  
-		if(!$this->chosenTemplates) user_error("None of these templates can be found in theme '"
  329
+		if(!$this->chosenTemplates) {
  330
+		  $templateList = (is_array($templateList)) ? $templateList : array($templateList);
  331
+		  
  332
+		  user_error("None of these templates can be found in theme '"
330 333
 			. self::current_theme() . "': ". implode(".ss, ", $templateList) . ".ss", E_USER_WARNING);
  334
+		}
331 335
 	}
332 336
 	
333 337
 	/**

0 notes on commit 0a3de45

Please sign in to comment.
Something went wrong with that request. Please try again.