fixed: php warnings
authorCiro Scognamiglio <c.scognamiglio@cslash.net>
Fri, 19 May 2017 11:04:51 +0000 (13:04 +0200)
committerCiro Scognamiglio <c.scognamiglio@cslash.net>
Fri, 19 May 2017 11:04:51 +0000 (13:04 +0200)
plekit/php/form.php

index f12d53e..f56f02a 100644 (file)
@@ -31,9 +31,9 @@ class PlekitForm {
     $this->values=$values;
 
     // make strict xhtml happy
-    $this->method="post";      if ($options['method']) $this->method=strtolower($options['method']);
-    $this->onSubmit=NULL;      if ($options['onSubmit']) $this->onSubmit=$options['onSubmit'];
-    $this->onReset=NULL;       if ($options['onReset']) $this->onReset=$options['onReset'];
+    $this->method="post";      if (isset($options['method']) && (!empty($options['method']))) $this->method=strtolower($options['method']);
+    $this->onSubmit=NULL;      if (isset($options['onSubmit']) && (!empty($options['onSubmit']))) $this->onSubmit=$options['onSubmit'];
+    $this->onReset=NULL;       if (isset($options['onReset']) && (!empty($options['onReset']))) $this->onReset=$options['onReset'];
   }
 
   function start () { print $this->start_html(); }