diff options
| author | jade (winter) | 2026-01-22 00:13:48 +0000 |
|---|---|---|
| committer | jade (winter) | 2026-01-22 00:13:48 +0000 |
| commit | f93538ae580432de7932e166efd2f3cbb5f07114 (patch) | |
| tree | 09e62b572c4f0d4f986146ed1f86bb326e8df100 | |
| parent | adc0ec91a02a5df9768e6b256e6772b48c605f25 (diff) | |
allow page extensions to have no links (default [])
| -rw-r--r-- | Digitigrade/Model/Note.php | 2 | ||||
| -rw-r--r-- | Digitigrade/Page.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Digitigrade/Model/Note.php b/Digitigrade/Model/Note.php index 6246795..d8f89d0 100644 --- a/Digitigrade/Model/Note.php +++ b/Digitigrade/Model/Note.php @@ -475,4 +475,4 @@ class Note extends PushableModel implements TimelineIncludeable, Notifyable { 'extensions' => $this->extensions ]; } -}
\ No newline at end of file +} diff --git a/Digitigrade/Page.php b/Digitigrade/Page.php index 963a27d..5b7102e 100644 --- a/Digitigrade/Page.php +++ b/Digitigrade/Page.php @@ -9,7 +9,7 @@ class Page implements \JsonSerializable { public string $title; public array $content; /** @var PageLink[] */ - public array $links; + public array $links = []; public static function create(string $title, array $content) { $page = new self(); @@ -72,4 +72,4 @@ class Page implements \JsonSerializable { 'links' => $this->links ]; } -}
\ No newline at end of file +} |
