WordPress at Your Fingertips
function is not described

SimplePie_Misc::error() public WP 1.0

{} It's a method of the class: SimplePie_Misc{}

No Hooks.

Return

null. Nothing.

Usage

$result = SimplePie_Misc::error( $message, $level, $file, $line );
$message (required)
-
$level (required)
-
$file (required)
-
$line (required)
-

Code of SimplePie_Misc::error() WP 5.8.2

public static function error($message, $level, $file, $line)
{
	if ((ini_get('error_reporting') & $level) > 0)
	{
		switch ($level)
		{
			case E_USER_ERROR:
				$note = 'PHP Error';
				break;
			case E_USER_WARNING:
				$note = 'PHP Warning';
				break;
			case E_USER_NOTICE:
				$note = 'PHP Notice';
				break;
			default:
				$note = 'Unknown Error';
				break;
		}

		$log_error = true;
		if (!function_exists('error_log'))
		{
			$log_error = false;
		}

		$log_file = @ini_get('error_log');
		if (!empty($log_file) && ('syslog' !== $log_file) && !@is_writable($log_file))
		{
			$log_error = false;
		}

		if ($log_error)
		{
			@error_log("$note: $message in $file on line $line", 0);
		}
	}

	return $message;
}