fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9422] property: import from catch: validate integer


From: Sigurd Nes
Subject: [Fmsystem-commits] [9422] property: import from catch: validate integer
Date: Tue, 22 May 2012 18:16:52 +0000

Revision: 9422
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9422
Author:   sigurdne
Date:     2012-05-22 18:16:52 +0000 (Tue, 22 May 2012)
Log Message:
-----------
property: import from catch: validate integer

Modified Paths:
--------------
    trunk/property/inc/cron/default/catch_ppc.php

Modified: trunk/property/inc/cron/default/catch_ppc.php
===================================================================
--- trunk/property/inc/cron/default/catch_ppc.php       2012-05-22 18:13:09 UTC 
(rev 9421)
+++ trunk/property/inc/cron/default/catch_ppc.php       2012-05-22 18:16:52 UTC 
(rev 9422)
@@ -232,11 +232,14 @@
                                                        case 'int4':
                                                                // Check if 
input starts with - (optional) and then only
                                                                // contains 
numbers
+                                                               /*
                                                                if( 
preg_match('@^[-]?[0-9]+$@', $insert_value) !== 1 )
                                                                {
                                                                        
$val_errors[] = lang('Input for field "%1" is "%2", but should be int (%3)',
                                                                                
$field_info->name, $insert_value, $file);
                                                                }
+                                                               */
+                                                               $insert_value = 
$insert_value ? (int) $insert_value : '';
                                                                break;
                                                        case 'numeric':
                                                                $insert_value = 
str_replace( ',', '.', $insert_value);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]