From a75b1a35c6f22dbecd55f6ee38fb09bd1aa9baa1 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 22 Jul 2015 13:47:52 +0200 Subject: [PATCH] monitoring: Don't fail when selecting custom variables while having a group by clause refs #9692 --- .../Monitoring/Backend/Ido/Query/IdoQuery.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php index b79229f8f..de89d23bb 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php @@ -891,9 +891,19 @@ abstract class IdoQuery extends DbQuery return $this->idxAliasColumn[$alias]; } + /** + * Get the alias of a column expression as defined in the {@link $columnMap} property. + * + * @param string $alias Potential custom alias + * + * @return string + */ public function customAliasToAlias($alias) { - return $this->idxCustomAliases[$alias]; + if (isset($this->idxCustomAliases[$alias])) { + return $this->idxCustomAliases[$alias]; + } + return $alias; } /**