Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Avoid fatal when groups not provided #273

Merged
merged 1 commit into from
Aug 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ script:
- ./typo3cms backend:lockforeditors
- ./typo3cms backend:unlockforeditors
- ./typo3cms cache:flush
- ./typo3cms cache:flushgroups pages
- ./typo3cms cache:flushtags foo
- ./typo3cms cache:flushtags foo pages
- ./typo3cms cache:listgroups
- ./typo3cms cleanup:updatereferenceindex
- ./typo3cms database:updateschema "*" --verbose
Expand Down
6 changes: 5 additions & 1 deletion Classes/Command/CacheCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ public function flushTagsCommand(array $tags, array $groups = null)
{
try {
$this->cacheService->flushByTagsAndGroups($tags, $groups);
$this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '" in groups: "' . implode('","', $groups) . '"');
if ($groups === null) {
$this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '"');
} else {
$this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '" in groups: "' . implode('","', $groups) . '"');
}
} catch (NoSuchCacheGroupException $e) {
$this->outputLine($e->getMessage());
$this->sendAndExit(1);
Expand Down