Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 843eb73

Browse files
committed
Merge pull request #15 from lars85/master
[BUGFIX] Concatenate arrays instead of merging
2 parents 3ef9680 + 68c2e36 commit 843eb73

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Classes/Service/CacheApiService.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,16 @@ class Tx_Coreapi_Service_CacheApiService {
3939
*
4040
*/
4141
public function initializeObject() {
42+
// Create a fake admin user
43+
$adminUser = new t3lib_beUserAuth();
44+
$adminUser->user['uid'] = $GLOBALS['BE_USER']->user['uid'];
45+
$adminUser->user['username'] = '_CLI_lowlevel';
46+
$adminUser->user['admin'] = 1;
47+
$adminUser->workspace = 0;
48+
4249
$this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
4350
$this->tce->start(Array(), Array());
51+
$this->tce->start(Array(), Array(), $adminUser);
4452
}
4553

4654
/**

Classes/Service/DatabaseApiService.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,21 @@ protected function getRequestKeys(array $update, array $remove) {
183183

184184
foreach ($updateActions as $updateAction) {
185185
if (isset($update[$updateAction]) && is_array($update[$updateAction])) {
186-
$tmpKeys += array_keys($update[$updateAction]);
186+
$tmpKeys[] = array_keys($update[$updateAction]);
187187
}
188188
}
189189

190190
foreach ($removeActions as $removeAction) {
191191
if (isset($remove[$removeAction]) && is_array($remove[$removeAction])) {
192-
$tmpKeys += array_keys($remove[$removeAction]);
192+
$tmpKeys[] = array_keys($remove[$removeAction]);
193193
}
194194
}
195195

196196
$finalKeys = array();
197-
foreach ($tmpKeys as $key) {
198-
$finalKeys[$key] = TRUE;
197+
foreach ($tmpKeys as $keys) {
198+
foreach ($keys as $key) {
199+
$finalKeys[$key] = TRUE;
200+
}
199201
}
200202
return $finalKeys;
201203
}

0 commit comments

Comments
 (0)