diff options
author | diosmosis <benaka@piwik.pro> | 2014-11-11 10:24:27 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-11-11 10:24:27 +0300 |
commit | 983535f3d749e1b95b3a4b22305c2627902c1de7 (patch) | |
tree | 3b5287615897fa12c6dd9973f986e555777fe452 /core/Plugin/Metric.php | |
parent | dc5d258fbecb07c0536e9f118e1efac6c0b072fa (diff) |
Fixing goals UI tests.
Diffstat (limited to 'core/Plugin/Metric.php')
-rw-r--r-- | core/Plugin/Metric.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Plugin/Metric.php b/core/Plugin/Metric.php index 06068df7e5..9200c0a607 100644 --- a/core/Plugin/Metric.php +++ b/core/Plugin/Metric.php @@ -91,7 +91,7 @@ abstract class Metric */ public static function getMetric($row, $columnName, $mappingNameToId = null) { - if (empty($mappingIdToName)) { + if (empty($mappingNameToId)) { $mappingNameToId = Metrics::getMappingFromNameToId(); } @@ -104,10 +104,11 @@ abstract class Metric } } else { $value = @$row[$columnName]; - if ($value === false + if ($value === null && isset($mappingNameToId[$columnName]) ) { - $value = $row[$mappingNameToId[$columnName]]; + $columnName = $mappingNameToId[$columnName]; + $value = @$row[$columnName]; } return $value; } |