projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #15365 from samuelsov/userdashboard
[civicrm-core.git]
/
CRM
/
Utils
/
API
/
MatchOption.php
diff --git
a/CRM/Utils/API/MatchOption.php
b/CRM/Utils/API/MatchOption.php
index b027d3edc0463c2011f8ba3a14fc303f2cceeb7d..0f0cdc8170af64af0ec1d922bb010b646fdf0bac 100644
(file)
--- a/
CRM/Utils/API/MatchOption.php
+++ b/
CRM/Utils/API/MatchOption.php
@@
-93,7
+93,7
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
$keys = $apiRequest['params']['options']['match'];
}
if (is_string($keys)) {
$keys = $apiRequest['params']['options']['match'];
}
if (is_string($keys)) {
- $keys =
array($keys)
;
+ $keys =
[$keys]
;
}
}
}
}
@@
-153,7
+153,8
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
if ($isMandatory) {
throw new API_Exception("Failed to match existing record");
}
if ($isMandatory) {
throw new API_Exception("Failed to match existing record");
}
- return $createParams; // OK, don't care
+ // OK, don't care
+ return $createParams;
}
elseif ($getResult['count'] == 1) {
$item = array_shift($getResult['values']);
}
elseif ($getResult['count'] == 1) {
$item = array_shift($getResult['values']);
@@
-184,7
+185,7
@@
class CRM_Utils_API_MatchOption implements API_Wrapper {
* APIv3 $params
*/
public function createGetParams($origParams, $keys) {
* APIv3 $params
*/
public function createGetParams($origParams, $keys) {
- $params =
array('version' => 3)
;
+ $params =
['version' => 3]
;
foreach ($keys as $key) {
$params[$key] = CRM_Utils_Array::value($key, $origParams, '');
}
foreach ($keys as $key) {
$params[$key] = CRM_Utils_Array::value($key, $origParams, '');
}