Merge branch 'CRM-12133' into master-CRM-12133
[civicrm-core.git] / CRM / Core / BAO / OptionValue.php
index b60ab664aed2d2ab9057163eb521b1d01cdfbd82..edc771bf333f87a8757eb3ec0dc8b9ffa6bba20e 100644 (file)
@@ -78,7 +78,7 @@ class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue {
       $params['name'] = $params['label'];
     }
     if(CRM_Utils_Array::value('weight', $params, NULL) === NULL){
-      $params['weight'] = self::getDefaultValue($params);
+      $params['weight'] = self::getDefaultWeight($params);
     }
     if (CRM_Utils_Array::value('value', $params, NULL) === NULL){
       $params['value'] = self::getDefaultValue($params);