Convergent Trading Posted March 3, 2022 Posted March 3, 2022 During the upgrade to version 4.6.10 the file... /system/Member/Member.php line 415 ... was updated with a change of logic to detect if the "memberSync" hook should be called. Our extension relies on calls to this hook and we noticed after this upgrade that data stopped coming through. I believe the change in logic at this time was intended to stop updates when only the "last_activity" field had changed and nothing else, however the logic used now fails on ANY data with more than 1 value in the $changes array. As a proof of concept I took the existing logic and tested it (this returns false, when it should return true) $changedCustomFields = []; $changes = [ 'a'=>1, 'b'=>1 ]; $res = ( \count( $changedCustomFields ) > 0 OR ( \count( $changes ) > 0 AND ( \count( $changes ) === 1 AND !isset( $changes['last_activity'] ) ) ) ); var_dump($res); // false I think the following logic should work instead... <?php $changedCustomFields = []; $changes = [ 'a' => 1, 'b' => 1 ]; $res = ( \count( $changedCustomFields ) > 0 OR ( \count( $changes ) > 0 AND !( \count( $changes ) === 1 AND isset( $changes['last_activity'] ) ) ) ); var_dump($res); // true
Marc Posted March 4, 2022 Posted March 4, 2022 I have flagged this for a developers attention, so they can review this. It may well have been an intentional change
Convergent Trading Posted March 14, 2022 Author Posted March 14, 2022 Hi @Marc Stridgen - has there been any progress with this? Thanks.
Convergent Trading Posted March 16, 2022 Author Posted March 16, 2022 @Daniel F Thanks, did you come to the same conclusion?
Daniel F Posted March 16, 2022 Posted March 16, 2022 3 hours ago, Convergent Trading said: @Daniel F Thanks, did you come to the same conclusion? Yes, thanks for the report. The fix is currently awaiting review and approval 🙂 Convergent Trading 1
Daniel F Posted March 22, 2022 Posted March 22, 2022 I can confirm that we fixed this for an upcoming release:)
Recommended Posts