Fix PHP 8 compatibility

This commit is contained in:
veselcraft 2023-09-22 23:42:46 +03:00
parent 123bc63441
commit 87fbcc90ee
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA
3 changed files with 5 additions and 5 deletions

View file

@ -105,7 +105,7 @@ class IP extends RowModel
$this->stateChanges("ip", $ip);
}
function save($log): void
function save(?bool $log = false): void
{
if(is_null($this->getRecord()))
$this->stateChanges("first_seen", time());

View file

@ -121,14 +121,14 @@ abstract class Media extends Postable
$this->stateChanges("hash", $hash);
}
function save(): void
function save(?bool $log = false): void
{
if(!is_null($this->processingPlaceholder) && is_null($this->getRecord())) {
$this->stateChanges("processed", 0);
$this->stateChanges("last_checked", time());
}
parent::save();
parent::save($log);
}
function delete(bool $softly = true): void

View file

@ -152,7 +152,7 @@ abstract class Postable extends Attachable
throw new ISE("Setting virtual id manually is forbidden");
}
function save(): void
function save(?bool $log = false): void
{
$vref = $this->upperNodeReferenceColumnName;
@ -171,7 +171,7 @@ abstract class Postable extends Attachable
$this->stateChanges("edited", time());
}*/
parent::save();
parent::save($log);
}
use Traits\TAttachmentHost;