Skip to content
Snippets Groups Projects
Verified Commit 0f2d6a8b authored by Damien's avatar Damien
Browse files

FIX #10256 Clause @sisters_entities without entity

parent 31e68b0c
No related branches found
No related tags found
No related merge requests found
......@@ -169,8 +169,13 @@ class PreparedClauseController
if ($total > 0) {
for ($i = 0; $i < $total; $i++) {
$tmpSisterEntity = trim(str_replace("'", '', $sistersEntities[1][$i]));
$sisterEntity = Entitymodel::getByEntityId(['entityId' => $tmpSisterEntity, 'select' => ['parent_entity_id']]);
$allSisterEntities = EntityModel::get(['select' => ['entity_id'], 'where' => ['parent_entity_id = ?'], 'data' => [$sisterEntity['parent_entity_id']]]);
if (!empty($tmpSisterEntity)) {
$sisterEntity = Entitymodel::getByEntityId(['entityId' => $tmpSisterEntity, 'select' => ['parent_entity_id']]);
}
$allSisterEntities = [];
if (!empty($sisterEntity)) {
$allSisterEntities = EntityModel::get(['select' => ['entity_id'], 'where' => ['parent_entity_id = ?'], 'data' => [$sisterEntity['parent_entity_id']]]);
}
$allSisterEntitiesClause = '';
foreach ($allSisterEntities as $key => $allSisterEntity) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment