Subversion Repositories eFlore/Applications.coel

Rev

Rev 1713 | Rev 1733 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1713 Rev 1728
Line 178... Line 178...
178
	}
178
	}
Line 179... Line 179...
179
 
179
 
180
 
180
 
181
	static function NULLifNotNum(&$params, $keys_to_null) {
181
	static function NULLifNotNum(&$params, $keys_to_null) {
-
 
182
		foreach($keys_to_null as $v) {
182
		foreach($keys_to_null as $v) {
183
			if(! array_key_exists($v, $params)) continue;
183
			if(array_key_exists($v, $params) && !is_numeric($params[$v])) {
184
			if(!is_numeric($params[$v]) && ! preg_match('/^-?\d+,\d*$/', $params[$v])) {
-
 
185
				$params[$v] = NULL;
-
 
186
			}
-
 
187
			else {
-
 
188
				$params[$v] = str_replace(',', '.', $params[$v]);
184
				$params[$v] = NULL;
189
			}
185
			}
190
 
Line 186... Line 191...
186
		}
191
		}
187
	}
192
	}