[pLog-svn] r6657 - plog/branches/lifetype-1.2/class/data/validator/rules

jondaley at devel.lifetype.net jondaley at devel.lifetype.net
Mon Jun 23 14:45:09 EDT 2008


Author: jondaley
Date: 2008-06-23 14:45:09 -0400 (Mon, 23 Jun 2008)
New Revision: 6657

Modified:
   plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php
Log:
fixed so it works under PHP5

Modified: plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php	2008-06-23 18:25:49 UTC (rev 6656)
+++ plog/branches/lifetype-1.2/class/data/validator/rules/urlformatrule.class.php	2008-06-23 18:45:09 UTC (rev 6657)
@@ -65,6 +65,11 @@
         if (!$value)
             return array('Result' => array(EW_ERR_URL_EMPTY_STRING), 'Value' => '');
 
+        if(!isset($options['Require']))
+            $options['Require'] = array();
+        if(!isset($options['Forbid']))
+            $options['Forbid'] = array();
+        
             /* Set up default options */
         $options = array_merge(array(/**/
                                        /* array('http', 'https', etc.) always lcase! */
@@ -78,7 +83,7 @@
                                    ), $options);
 
             /* Setup default values for $options['Require]*/
-        @ $options['Require'] = array_merge(array(/**/
+        $options['Require'] = array_merge(array(/**/
                                                 'Protocol' => true, /**/
                                                 'User' => false, /**/
                                                 'Password' => false, /**/
@@ -91,7 +96,7 @@
                                                 ), $options['Require']);
 
             /* Setup default values for $options['Forbid]*/
-        @ $options['Forbid'] = array_merge(array(/**/
+        $options['Forbid'] = array_merge(array(/**/
                                                'Protocol' => false, /**/
                                                'User' => false, /**/
                                                'Password' => false, /**/



More information about the pLog-svn mailing list