改名
This commit is contained in:
+1
-12
@@ -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.';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user