PHP 8.2 compatibility fix

This commit is contained in:
veselcraft 2023-10-28 13:23:47 +03:00
parent 2757599492
commit cd7b51fcf6
No known key found for this signature in database
GPG key ID: 9CF0B42766CCF7BA

View file

@ -279,12 +279,12 @@ class Poll extends Attachable
return $poll;
}
function save(): void
function save(?bool $log = false): void
{
if(empty($this->choicesToPersist))
throw new InvalidStateException;
parent::save();
parent::save($log);
foreach($this->choicesToPersist as $option) {
DatabaseConnection::i()->getContext()->table("poll_options")->insert([
"poll" => $this->getId(),