X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FGeneric%2FGetlist.php;h=7a5255f3bb77bc9a5c16fa1dcfa1ce91f789a36a;hb=bb0c64a4e544f1d64e136c837a81d3af5faa28ed;hp=6cc49431286e687e37e202dc85122487536d2e8a;hpb=017aaef5e683dbee3468532c8a3ac857ee22f83c;p=civicrm-core.git diff --git a/api/v3/Generic/Getlist.php b/api/v3/Generic/Getlist.php index 6cc4943128..7a5255f3bb 100644 --- a/api/v3/Generic/Getlist.php +++ b/api/v3/Generic/Getlist.php @@ -2,9 +2,9 @@ /* +--------------------------------------------------------------------+ -| CiviCRM version 4.4 | +| CiviCRM version 4.5 | +--------------------------------------------------------------------+ -| Copyright CiviCRM LLC (c) 2004-2013 | +| Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -113,8 +113,8 @@ function _civicrm_api3_generic_getList_defaults($entity, &$request) { } // When looking up a field e.g. displaying existing record if (!empty($request['id'])) { - if (is_string($request['id']) && strpos(',', $request['id'])) { - $request['id'] = explode(',', $request['id']); + if (is_string($request['id']) && strpos($request['id'], ',')) { + $request['id'] = explode(',', trim($request['id'], ', ')); } // Don't run into search limits when prefilling selection unset($params['options']['limit'], $params['options']['offset'], $request['params']['options']['limit'], $request['params']['options']['offset']);