$storeAdminsNames = array_combine($storeAdminsIds, $storeAdminsNamesPrepared);
+ $timetableAnotherStore = [];
+ $adminIdsInShiftAnotherStore = [];
+ $adminNamesInShiftAnotherStore = [];
+ $storeIdsInShiftAnotherStore = [];
- $adminAnotherStore = $this->setAdminStore($timetableAnotherStore);
+ if (!empty($timetableAnotherStore)) {
+ $adminAnotherStore = $this->setAdminStore($timetableAnotherStore);
- $timetableAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'timetable');
- $adminIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminIdsInShift');
- $adminNamesInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminNamesInShift');
- $storeIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'storeIdsInShift');
+ $timetableAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'timetable');
+ $adminIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminIdsInShift');
+ $adminNamesInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'adminNamesInShift');
+ $storeIdsInShiftAnotherStore = ArrayHelper::getValue($adminAnotherStore, 'storeIdsInShift');
+ }
$storeIdsInShiftKeys = array_merge(array_keys($storeIdsInShift), array_keys($storeIdsInShiftAnotherStore));
$storeIdsInShiftValues = array_merge($storeIdsInShift, $storeIdsInShiftAnotherStore);