function RulesLog::hasErrors

Checks the log for error messages.

Parameters

int $logLevel: Lowest log level to return. Values lower than $logLevel will not be returned.

Return value

bool Whether the an error has been logged.

File

includes/rules.core.inc, line 2765

Class

RulesLog
The rules default logging class.

Code

public function hasErrors($logLevel = self::WARN) {
    foreach ($this->log as $entry) {
        if ($entry[2] >= $logLevel) {
            return TRUE;
        }
    }
    return FALSE;
}