mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
fixed another deprecation issue
This commit is contained in:
@@ -1438,15 +1438,17 @@ class Admin
|
||||
*/
|
||||
public function lastBackup()
|
||||
{
|
||||
$file = JsonFile::instance($this->grav['locator']->findResource('log://backup.log'));
|
||||
$content = $file->content();
|
||||
if (empty($content)) {
|
||||
$backup_file = $this->grav['locator']->findResource('log://backup.log');
|
||||
|
||||
if (!file_exists($backup_file)) {
|
||||
return [
|
||||
'days' => '∞',
|
||||
'chart_fill' => 100,
|
||||
'chart_empty' => 0
|
||||
];
|
||||
}
|
||||
$file = JsonFile::instance($backup_file);
|
||||
$content = $file->content();
|
||||
|
||||
$backup = new \DateTime();
|
||||
$backup->setTimestamp($content['time']);
|
||||
|
||||
Reference in New Issue
Block a user