[PHPLIB-DEV] cvs commit From: uw (phplib-dev <email protected>)
Date: 01/10/00

From: uw
Date: Mon Jan 10 17:48:47 2000
Modified files:
      php-lib/php/of_text.inc

Log message:
of_text.inc did'nt validate fields with names that look like arrays such as
customer[surname]. It was necessary to add double quotes when changing the
type of $val in self_validate() with: if (!is_array($val)) $val = array("$val")

Index: php-lib/php/of_text.inc
diff -u php-lib/php/of_text.inc:1.9 php-lib/php/of_text.inc:1.10
--- php-lib/php/of_text.inc:1.9 Thu Dec 2 06:35:07 1999
+++ php-lib/php/of_text.inc Mon Jan 10 17:48:17 2000
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1998 by Jay Bloodworth
  *
- * $Id: of_text.inc,v 1.9 1999/12/02 05:35:07 uw Exp $
+ * $Id: of_text.inc,v 1.10 2000/01/10 16:48:17 uw Exp $
  */
 
 class of_text extends of_element {
@@ -88,7 +88,7 @@
   }
 
   function self_validate($val) {
- if (!is_array($val)) $val = array($val);
+ if (!is_array($val)) $val = array("$val");
     reset($val);
     while (list($k,$v) = each($val)) {
       if ($this->length_e && (strlen($v) < $this->minlength))
@@ -103,4 +103,4 @@
   }
 
 } // end TEXT
-?>
\ No newline at end of file
+?>

-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.