From 40eb6fe0d66ee4cbf0326bfab7e73e3bb403ac2e Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Mon, 11 Jan 2010 11:11:05 -0500 Subject: [PATCH] Operator: Fix accountcode array construction --- operator/lib/Operator.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/operator/lib/Operator.php b/operator/lib/Operator.php index 9e05b4c53..efba0efe5 100644 --- a/operator/lib/Operator.php +++ b/operator/lib/Operator.php @@ -89,7 +89,7 @@ class Operator { function getAccountCodes($permfilter = false) { global $operator; - if (empty($operator)) { + if (empty($operator) || empty($operator->driver)) { $operator = new Operator_Application(array('init' => true)); } @@ -141,9 +141,8 @@ class Operator { throw new Operator_Exception(_("You do not have permission to view any accounts.")); } } else { - $accountcodes = array_merge($keys, $values); + $accountcodes = array_combine($keys, $values); } - return $accountcodes; } -- 2.11.0