RSS Feed/News Does saveIfChanged check if custom fields have changed?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
21,477
Points
823

Reputation:

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:

PHP:

Code:
// $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...

Read more

Continue reading...
 
Status
Not open for further replies.
Top