PaulB
Well-known member
- Affected version
- 2.2.1
Setting a column definition's
Lines 58-65 of the ChangeLoggable behavior:
Lines 83-87 of the ChangeLoggable behavior:
If
changeLog property to true results in the wrong code path being taken; it's interpreted as 'changeLog' => 'customFields'. This is problematic when optIn is enabled, since the intention is to set changeLog to true in that scenario.Lines 58-65 of the ChangeLoggable behavior:
PHP:
if ($this->config['optIn'])
{
// must explicitly list columns to log
if (empty($definition['changeLog']))
{
continue;
}
}
Lines 83-87 of the ChangeLoggable behavior:
PHP:
if (isset($definition['changeLog']) && $definition['changeLog'] == 'customFields')
{
$changes += $this->getCustomFieldChanges($oldValue, $newValue, $column);
continue;
}
If
optIn is true, the changeLog column property becomes problematic: it can't be set to true because $definition['changeLog'] == 'customFields' will return true, since true == 'customFields'. Line 83 should be changed to:
PHP:
if (isset($definition['changeLog']) && $definition['changeLog'] === 'customFields')