Convergent Trading Posted March 3, 2022 Share 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 Link to comment Share on other sites More sharing options...
Marc Posted March 4, 2022 Share 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 Link to comment Share on other sites More sharing options...
Convergent Trading Posted March 14, 2022 Author Share Posted March 14, 2022 Hi @Marc Stridgen - has there been any progress with this? Thanks. Link to comment Share on other sites More sharing options...
Daniel F Posted March 14, 2022 Share Posted March 14, 2022 Sorry for the delay, I'll look at this today. Link to comment Share on other sites More sharing options...
Convergent Trading Posted March 16, 2022 Author Share Posted March 16, 2022 @Daniel F Thanks, did you come to the same conclusion? Link to comment Share on other sites More sharing options...
Daniel F Posted March 16, 2022 Share 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 Link to comment Share on other sites More sharing options...
Daniel F Posted March 22, 2022 Share Posted March 22, 2022 I can confirm that we fixed this for an upcoming release:) Link to comment Share on other sites More sharing options...
Recommended Posts