remove a lot of error suppression in favor of ?? in various utility classes
[php-utility-classes.git] / classes / document.php-class
index f215f7bc36a275dbc54b320a6f0e7d60e8ceb508..198296f3e1a7eaa5ac8906ebec66f1cb3f2b5273 100755 (executable)
@@ -173,8 +173,7 @@ class ExtendedDocument extends DOMDocument {
   //   returns an ExtendedElement that is an HTML <img> with the given src and alt attributes (set to '' by default)
   //
   // public function createElementForm($action, $method, $name)
-  //   returns an ExtendedElement that is an HTML <div> that is a child of an HTML <form>
-  //   with the given action, method, and name
+  //   returns an ExtendedElement that is an HTML <form> with the given action, method, and name
   //
   // public function createElementInputHidden($name, $value)
   //   returns an ExtendedElement that is an HTML <input> of type 'hidden' with the given name and value
@@ -554,23 +553,25 @@ class ExtendedDocument extends DOMDocument {
   }
 
   public function createElementInputDate($name, $id = null, $min = null, $max = null, $value = null) {
-    $telfield = $this->createElement('input');
-    $telfield->setAttribute('type', 'date');
-    if (!is_null($id)) { $telfield->setAttribute('id', $id); }
-    if (!is_null($min)) { $rgfield->setAttribute('min', $min); }
-    if (!is_null($max)) { $rgfield->setAttribute('max', $max); }
-    if (!is_null($value)) { $telfield->setAttribute('value', $value); }
-    return $telfield;
+    $dtfield = $this->createElement('input');
+    $dtfield->setAttribute('type', 'date');
+    if (!is_null($id)) { $dtfield->setAttribute('id', $id); }
+    $dtfield->setAttribute('name', $name);
+    if (!is_null($min)) { $dtfield->setAttribute('min', $min); }
+    if (!is_null($max)) { $dtfield->setAttribute('max', $max); }
+    if (!is_null($value)) { $dtfield->setAttribute('value', $value); }
+    return $dtfield;
   }
 
   public function createElementInputTime($name, $id = null, $min = null, $max = null, $value = null) {
-    $telfield = $this->createElement('input');
-    $telfield->setAttribute('type', 'time');
-    if (!is_null($id)) { $telfield->setAttribute('id', $id); }
-    if (!is_null($min)) { $rgfield->setAttribute('min', $min); }
-    if (!is_null($max)) { $rgfield->setAttribute('max', $max); }
-    if (!is_null($value)) { $telfield->setAttribute('value', $value); }
-    return $telfield;
+    $timefield = $this->createElement('input');
+    $timefield->setAttribute('type', 'time');
+    if (!is_null($id)) { $timefield->setAttribute('id', $id); }
+    $timefield->setAttribute('name', $name);
+    if (!is_null($min)) { $timefield->setAttribute('min', $min); }
+    if (!is_null($max)) { $timefield->setAttribute('max', $max); }
+    if (!is_null($value)) { $timefield->setAttribute('value', $value); }
+    return $timefield;
   }
 
   public function createElementInputColor($name, $id = null, $value = null) {