X-Git-Url: https://git.bts.cx/cx.git/blobdiff_plain/27850f5b260560bdf75f3fca169ec5950ed00b22..c469f0f84d54065f375698e891da3461abaf661f:/cx/lib/posts.php diff --git a/cx/lib/posts.php b/cx/lib/posts.php index 2c2dc82..0a2ac4d 100644 --- a/cx/lib/posts.php +++ b/cx/lib/posts.php @@ -15,8 +15,8 @@ class PostMetadata { public $hero_image_alt; public function __construct($dict) { - $this->hero_image = $dict['post_hero_image']; - $this->hero_image_alt = $dict['post_hero_image_alt']; + $this->hero_image = isset($dict['post_hero_image']) ? $dict['post_hero_image'] : null; + $this->hero_image_alt = isset($dict['post_hero_image_alt']) ? $dict['post_hero_image_alt'] : null; } }