Field name, first part of which is equal to another field name, is serialized incorrectly.
http://dl4.joxi.net/drive/2018/12/18/0025/0672/1700512/12/5bf1033ebc.jpg
If we use expand for field AB, which name includes name for field A, field A will be serialized too. In some cases it initiate extra query and in some cases - CircularReferenceException.
Problem occures because of wrong parsing:
if (strpos($expansionPath, $currentPath) === 0)
Field name, first part of which is equal to another field name, is serialized incorrectly.
http://dl4.joxi.net/drive/2018/12/18/0025/0672/1700512/12/5bf1033ebc.jpg
If we use expand for field AB, which name includes name for field A, field A will be serialized too. In some cases it initiate extra query and in some cases - CircularReferenceException.
Problem occures because of wrong parsing:
if (strpos($expansionPath, $currentPath) === 0)