In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
Before this change if a new post was made after the digest time but
before todays daily digest had been sent the run time on the digest
would be set to the next day resulting in no digest being sent to
the user.
By adding the server midnight to the custom data on the task we
ensure that in this case a new adhoc task is created for the next
day leaving the current one to get processed.
Server midnight is used so that if the digest time setting is
changed we would not get two tasks queued for the same day.
Note that this is a very basic conversion without doing any refactoring
to split the tasks up better. That will come in MDL-44734, this is about
being a safe backportable change to give admins better control over the
running of the forum cron task.