Fix pseudoconstant regression
authorColeman Watts <coleman@civicrm.org>
Thu, 18 Jul 2013 00:08:19 +0000 (17:08 -0700)
committerColeman Watts <coleman@civicrm.org>
Thu, 18 Jul 2013 00:08:19 +0000 (17:08 -0700)
CRM/Core/PseudoConstant.php

index 2cabc11fb212ab2360931ad0808e07e790262889..32a177bac88b87aaaf4bba046a39bb78ab897060 100644 (file)
@@ -326,7 +326,9 @@ class CRM_Core_PseudoConstant {
             return FALSE;
           }
           // Get list of fields for the option table
-          $availableFields = array_keys($fieldKeys);
+          $dao = new $daoName;
+          $availableFields = array_keys($dao->fieldKeys());
+          $dao->free();
 
           $select = "SELECT %1 AS id, %2 AS label";
           $from = "FROM %3";