/** * Checks if the datatype is a double, float, decimal * @param input The input object * @return boolean */ public static function DoubleFloat($input) { if ($input->input_data_type == "DECIMAL" || $input->input_data_type == "DEC" || $input->input_data_type == "FLOAT" || $input->input_data_type == "DOUBLE" || $input->input_data_type == "NUMERIC" || $input->input_data_type == "DOUBLE PRECISION" || $input->input_data_type == "REAL") { if (!is_float((double) $_POST[$input->input_name])) { Logger::Request(); Logger::Error($input->input_name . " is not a float or double. " . $input->input_name . " = " . $_POST[$input->input_name]); Dialog::RequestUnexpectedValueTypeOrFormat(); } return true; } return false; }