Skip to content

Commit fc3820d

Browse files
committed
WorkspaceFolder: Add constructor default for limit (#11510)
See: https://mantis.ilias.de/view.php?id=46038 The `adheres_to_limit` property was nullable and never initialized before use. A constructor now creates a `BooleanValue`, sets it to `false`, and assigns it so the property is always defined.
1 parent 4bc71a3 commit fc3820d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

components/ILIAS/WorkspaceFolder/BackgroundTask/classes/class.ilWorkspaceCopyDefinition.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ class ilWorkspaceCopyDefinition extends AbstractValue
3838
private array $object_wsp_ids = [];
3939
private int $num_files = 0;
4040
private int $sum_file_sizes = 0;
41-
private ?BooleanValue $adheres_to_limit = null;
41+
private BooleanValue $adheres_to_limit;
42+
43+
public function __construct()
44+
{
45+
$adheres_to_limit = new BooleanValue();
46+
$adheres_to_limit->setValue(false);
47+
$this->adheres_to_limit = $adheres_to_limit;
48+
}
4249

4350
public function getCopyDefinitions(): array
4451
{

0 commit comments

Comments
 (0)