Skip to content

Commit

Permalink
Merge pull request #339 from nextcloud/bugfix/337/fix_undefined_index
Browse files Browse the repository at this point in the history
prevent some undefined index errors
  • Loading branch information
georgehrke authored Feb 12, 2017
2 parents 2eb5410 + a054564 commit 2631e42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controller/viewcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ public function publicIndex() {
'appVersion' => $appVersion,
'initialView' => 'month',
'emailAddress' => '',
'skipPopover' => 'no',
'weekNumbers' => 'no',
'supportsClass' => $supportsClass,
'firstRun' => 'no',
'webCalWorkaround' => 'no',
'isPublic' => true,
'shareURL' => $this->request->getServerProtocol() . '://' . $this->request->getServerHost() . $this->request->getRequestUri(),
'previewImage' => $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'favicon-touch.png')),
Expand Down
3 changes: 3 additions & 0 deletions tests/php/controller/viewcontrollerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,14 @@ public function testPublicIndex($isAssetPipelineEnabled, $showAssetPipelineError
'appVersion' => '42.13.37',
'initialView' => 'month',
'emailAddress' => '',
'skipPopover' => 'no',
'weekNumbers' => 'no',
'supportsClass' => $expectsSupportsClass,
'isPublic' => true,
'shareURL' => '://',
'previewImage' => null,
'firstRun' => 'no',
'webCalWorkaround' => 'no',
'needsAutosize' => $needsAutosize,
], $actual->getParams());
$this->assertEquals('main', $actual->getTemplateName());
Expand Down

0 comments on commit 2631e42

Please sign in to comment.