Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Site.php')
-rw-r--r--core/Site.php5
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];
}