Skip to content

Commit

Permalink
The type of 3rd argument is string
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Mattos <vitor@php.rio>
  • Loading branch information
vitormattos committed Dec 28, 2023
1 parent f42e7d1 commit 5356c09
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Command/Configure/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct(
) {
parent::__construct();
$this->configureCheckService = $configureCheckService;
$this->pagePreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', false);
$this->pagePreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', '0');
}

protected function configure(): void {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/AccountService.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function getSettings(?IUser $user = null): array {
}

private function canPreviewPageAsImage(): bool {
if ((bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', false)) {
if ((bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', '0')) {
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/ConfigureCheckService.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function checkSign(): array {
* @return ConfigureCheckHelper[]
*/
public function canPreview(): array {
$pagePreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', false);
$pagePreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', '0');
if (!$pagePreviewAsImage) {
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/FileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function formatFile(): array {
}

public function getPage(string $uuid, int $page, string $uid): string {
$canPreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', false);
$canPreviewAsImage = (bool) $this->config->getAppValue(Application::APP_ID, 'page_preview_as_image', '0');
if (!$canPreviewAsImage) {
throw new LibresignException($this->l10n->t('Page not found.'));
}
Expand Down

0 comments on commit 5356c09

Please sign in to comment.