- 🇬🇧United Kingdom longwave UK
Just run into this in a roundabout way. I have a site which has altered the revision_log field and
$record->revision_log
is not a valid column in the table any more. Agree that this is making assumptions about the data structure that is in use here, and it should be done in a more generic way instead. - 🇬🇧United Kingdom longwave UK
if (!$this->isNewRevision() && isset($this->original) && (!isset($record->revision_log) || $record->revision_log === '')) {
I also think this logic could be simplified:
if (!$this->isNewRevision() && isset($this->original) && isset($record->revision_log) && $record->revision_log === '') {
If
$record->revision_log
is not set then we don't need to set it at all for the purposes of the SQL statement.