Skip to content

Commit ccbf041

Browse files
authored
Merge pull request #92 from ilumos/master
Fix undefined property when supported languages field is not set
2 parents e00e9b3 + 92bc481 commit ccbf041

File tree

1 file changed

+4
-1
lines changed
  • src/Syntax/SteamApi/Containers

1 file changed

+4
-1
lines changed

src/Syntax/SteamApi/Containers/App.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class App extends BaseContainer
5757
public $achievements;
5858

5959
public $dlc;
60+
61+
public $movies;
6062

6163
public function __construct($app)
6264
{
@@ -83,10 +85,11 @@ public function __construct($app)
8385
$this->requiredAge = (int)$app->required_age;
8486
$this->isFree = $app->is_free;
8587
$this->shortDescription = $app->short_description;
86-
$this->supportedLanguages = $app->supported_languages;
88+
$this->supportedLanguages = $this->checkIssetField($app, 'supported_languages', 'None');
8789
$this->recommendations = $this->checkIssetField($app, 'recommendations', $this->getFakeRecommendationsObject());
8890
$this->achievements = $this->checkIssetField($app, 'achievements', $this->getFakeAchievementsObject());
8991
$this->dlc = $this->checkIssetCollection($app, 'dlc', new Collection());
92+
$this->movies = $this->checkIssetCollection($app, 'movies', new Collection());
9093

9194
}
9295

0 commit comments

Comments
 (0)