This commit is contained in:
2021-08-12 17:24:29 +08:00
parent 7b79b98571
commit d67b32795a
+1 -12
View File
@@ -165,18 +165,7 @@ class Logger extends Component
*/
public function getLastError(string $application = 'app'): mixed
{
return $this->logs[$application] ?? null;
foreach ($this->logs as $val) {
if ($val[0] != $application) {
continue;
}
$filetype[] = $val[1];
}
if (empty($filetype)) {
return 'Unknown error.';
}
return end($filetype);
return $this->logs[$application] ?? 'Unknown error.';
}
/**