benFF
Well-known member
I know this sounds like a stupid question but I want to make sure.
If I have a function that calls $item->custom_fields->set and then after $item->saveIfChanged - does XF check if the set command actually made a difference, or will the fact I called set mean it will save?
IE:
Will the entity save or skip (as the value even though set, was exactly the same as current)?
If I have a function that calls $item->custom_fields->set and then after $item->saveIfChanged - does XF check if the set command actually made a difference, or will the fact I called set mean it will save?
IE:
PHP:
// $item->custom_fields->test is currently equal to 1
$item->custom_fields->set('test', 1, 'admin', true);
$item->saveIfChanged()
Will the entity save or skip (as the value even though set, was exactly the same as current)?