Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).


## [Unreleased]

### Fixed

- [645](https://github.com/owncloud/richdocuments/pull/645) - Give the remaining app config settings an empty-string default, so opening a document no longer logs a PHP deprecation on every open

## [4.3.1] - 2026-09-22

### Security
Expand Down Expand Up @@ -209,7 +215,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [2.4.0] - 2020-07-30


[Unreleased]: https://github.com/owncloud/richdocuments/compare/v4.2.0...master
[Unreleased]: https://github.com/owncloud/richdocuments/compare/v4.3.1...master

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other releases 4.2.1 4.2.2 4.3.2 that have gone missing from this section.
Maybe fix that in a follow-up PR (not directly related to this)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, and done as a follow-up: #646.

It turned out to be a bit more than missing entries. Five headings had no definition at all —
4.2.1, 4.2.2, 4.2.3, 4.3.0, 4.3.1 (there is no 4.3.2 yet) — and on top of that two of the
existing definitions pointed at tags that were never created, so they were live 404s:

  • [4.0.0] → compare/v3.0.1...v4.0.0 — v3.0.1 was only ever tagged -beta.1 / -rc.1
  • [3.0.1] → same missing tag, and an orphan: there is no ## [3.0.1] section
  • [2.4.0] → compare/v2.2.0...v2.4.0 — v2.4.0 is the oldest tag in the repo

#646 fetches every link in the block afterwards: all 15 return 200, and every section heading has
exactly one definition.

One thing worth knowing: #646 touches this same contiguous block, so the two conflict by
construction. Merging this PR first and letting me rebase #646 is the easy order.

[4.2.0]: https://github.com/owncloud/richdocuments/compare/v4.1.0...v4.2.0
[4.1.0]: https://github.com/owncloud/richdocuments/compare/v4.0.0...v4.1.0
[4.0.0]: https://github.com/owncloud/richdocuments/compare/v3.0.1...v4.0.0
Expand Down
5 changes: 5 additions & 0 deletions lib/AppConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AppConfig {
'zotero' => 'false',
'watermark_text' => '',
'test_server_groups' => '',
'edit_groups' => '',
'wopi_url' => '',
'test_wopi_url' => '',
'doc_format' => '',
'menu_option' => '',
'canonical_webroot' => '',
];

Expand Down
26 changes: 26 additions & 0 deletions tests/unit/AppConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,32 @@ public function testOpenInNewtabDefault() {
$this->assertEquals(true, $enterpriseEdition);
}

public function stringSettingProvider() {
return [
['edit_groups'],
['wopi_url'],
['test_wopi_url'],
['doc_format'],
['menu_option'],
];
}

/**
* Settings holding a string must default to an empty string, never to null,
* so that consumers passing them to string functions do not run into the
* PHP 8.1 deprecation of null arguments.
*
* @dataProvider stringSettingProvider
*/
public function testStringSettingDefaultsToEmptyString($key) {
$this->config->expects($this->once())
->method('getAppValue')
->with('richdocuments', $key, $this->identicalTo(''))
->willReturn('');

$this->assertSame('', $this->appConfig->getAppValue($key));
}

public function enterpriseFeaturesEnabledProvider() {
return [
[true, 'false', true],
Expand Down
Loading