--- phptemplate.engine	2004-12-09 22:00:34.000000000 +0100
+++ v:/Websites/Develop Website/jumelage/themes/engines/phptemplate/phptemplate.engine	2005-02-04 14:14:21.709107200 +0100
@@ -125,8 +125,12 @@
     for ($i = 0; $i < $count; $i++) {
       $row = array(); 
       foreach (array('text', 'link', 'description') as $field) {
-        $row[] = form_textfield('', 'phptemplate_' . $type . '_links][' . $field . '][' . $i, $value[$field][$i], 15, 90);
-      }
+        if (is_array($value[$field])) {
+          $row[] = form_textfield('', 'phptemplate_' . $type . '_links][' . $field . '][' . $i, $value[$field][$i], 15, 90);
+        } else {
+          $row[] = form_textfield('', 'phptemplate_' . $type . '_links][' . $field . '][' . $i, '', 15, 90);
+        }
+     }
       $rows[] = $row;
     }
     $form .= form_item(t("$utype links"), theme("table", $header, $rows), t('You can specify your _TYPE_ links here, one link per line.<br /> The link text field is the text you want to link.<br /> The url field is the location the link points to.<br /> The description field is an optional description of where the link points.', array('_TYPE_' => $type)));
@@ -332,7 +336,7 @@
   }
 
   if ($file) {
-    $phptemplate[$hook] = &new Template(dirname($file));
+    $phptemplate[$hook] = new Template(dirname($file));
     $phptemplate[$hook]->set_vars($vars);
     return $phptemplate[$hook]->fetch(basename($file));
   }
