diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-04-05 07:43:51 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-04-05 07:43:51 +0400 |
commit | 94d0ce393b2c496cda571571a0425af846406fda (patch) | |
tree | 45a06f1cc2c3bcfec14cdfabc394c14449ecb659 /plugins | |
parent | 1507a3a511b4c5f91fcaec5bbabc849747aa9f6b (diff) |
Trying to fix: PHP Fatal error: Call to a member function getCurrency() on a non-object in /home/travis/build/piwik/piwik/plugins/Live/API.php on line 554
https://travis-ci.org/piwik/piwik/jobs/22318726
Note: this should not happen really and I'm puzzled... especially as it works on other PHP versions...
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Live/API.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Live/API.php b/plugins/Live/API.php index ebc8481d74..054759cceb 100644 --- a/plugins/Live/API.php +++ b/plugins/Live/API.php @@ -551,11 +551,10 @@ class API extends \Piwik\Plugin\API $visitor = new Visitor($visitorDetailsArray); $visitorDetailsArray = $visitor->getAllVisitorDetails(); - if(!is_object($website)) { - var_dump($website); + if($website) { + $visitorDetailsArray['siteCurrency'] = $website->getCurrency(); + $visitorDetailsArray['siteCurrencySymbol'] = @$currencies[$visitorDetailsArray['siteCurrency']]; } - $visitorDetailsArray['siteCurrency'] = $website->getCurrency(); - $visitorDetailsArray['siteCurrencySymbol'] = @$currencies[$visitorDetailsArray['siteCurrency']]; $visitorDetailsArray['serverTimestamp'] = $visitorDetailsArray['lastActionTimestamp']; $dateTimeVisit = Date::factory($visitorDetailsArray['lastActionTimestamp'], $timezone); $visitorDetailsArray['serverTimePretty'] = $dateTimeVisit->getLocalized('%time%'); |