diff options
Diffstat (limited to 'core/Site.php')
-rw-r--r-- | core/Site.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Site.php b/core/Site.php index deefbd4911..4818590f82 100644 --- a/core/Site.php +++ b/core/Site.php @@ -231,8 +231,11 @@ class Site */ protected function get($name) { + if (!isset(self::$infoSites[$this->id])) { + throw new UnexpectedWebsiteFoundException('The requested website id = ' . (int)$this->id . ' couldn\'t be found'); + } if (!isset(self::$infoSites[$this->id][$name])) { - throw new Exception('The requested website id = ' . (int)$this->id . ' (or its property ' . $name . ') couldn\'t be found'); + throw new Exception("The property $name could not be found on the website ID " . (int)$this->id); } return self::$infoSites[$this->id][$name]; } |