Commits

jsumners  committed 49e93bf

Fixed a small bug in the set() function and bumped the version number.

  • Participants
  • Parent commits cc6c5f4

Comments (0)

Files changed (1)

File PWPTemplate.php

  * @copyright Platypus Web Productions (http://platypuswp.com/)
  * @license http://opensource.org/licenses/mit-license.php MIT License
  *
- * @version 0.3 06/11/2010
+ * @version 0.4 06/23/2010
  *
  * @package PWPTemplate
  */
 	 */
 	public function set($name, $value) {
 		if ( is_object($value) ) {
-			$tmp = $value->templateAsString();
+			if (get_class($value) == "PWPTemplate") {
+				$tmp = $value->templateAsString();
+			} else {
+				throw new Exception('PWPTemplate::set() -> Unsupported object.');
+				return NULL;
+			}
+
 			if ($tmp) {
 				$this->pwp_vars[$name] = $tmp;
 			} else {