You are here

public static function cf_error::invalid_numeric in Common Functionality 7.2

Reports that a given argument is supposed to be numeric but is not.

@see: watchdog() @see: watchdog_severity_levels()

Parameters

string $argument_names: The variable name of the argument in question.

int $severity: (optional) The severity of the message, as per RFC 3164. Possible values are WATCHDOG_ERROR, WATCHDOG_WARNING, etc.

Return value

cf_error_code A object containing the processed error, with specified backtrace.

7 calls to cf_error::invalid_numeric()
cf_convert_from_crud in ./cf.module
Converts the passed argument into an array of multiple booleans.
cf_db_options_id_to_machine_name in modules/cf_db_options/cf_db_options.module
Returns the machine_name for a given option numeric id.
cf_error::not_numeric in modules/cf_error/classes/cf_error.php
Reports that a given argument is supposed to be numeric but is not.
cf_error_not_numeric in modules/cf_1x_compatibility/cf_1x_compatibility.module
This is a compatibility function for cf-1.x.
cf_http_get_response in modules/cf_http/cf_http.module
Reads an http page at the given path and returns an unprocessed response.

... See full list

File

modules/cf_error/classes/cf_error.php, line 416
Provides the derror exception class.

Class

cf_error

Code

public static function invalid_numeric($argument_name, $severity = WATCHDOG_ERROR) {
  $error = new cf_error_code();
  if (empty($argument_name)) {
    if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
      $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, self::p_backtrace_limit());
    }
    else {
      $backtrace = debug_backtrace();
    }
    $argument_name = self::p_report_invalid_argument_string('argument_name', $backtrace);
    unset($backtrace);
  }
  $error
    ->set_severity($severity);
  self::p_load_backtrace($error);
  self::p_invalid_numeric($error, $argument_name);
  return $error;
}