X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2Fexamples%2FSetting%2FGetValue.php;h=a5534bcac960f65713222109b3d557f678bbe8be;hb=cf8f0fff2d9b29aeeb6b511208054da760b4d544;hp=10991cc435bb1d8fb872dd673e90a1251e32c90a;hpb=02ecf7390cb9c36ca2601b8cafb4ac3ac9782653;p=civicrm-core.git diff --git a/api/v3/examples/Setting/GetValue.php b/api/v3/examples/Setting/GetValue.php index 10991cc435..a5534bcac9 100644 --- a/api/v3/examples/Setting/GetValue.php +++ b/api/v3/examples/Setting/GetValue.php @@ -8,10 +8,10 @@ * API result array */ function setting_getvalue_example() { - $params = array( + $params = [ 'name' => 'petition_contacts', 'group' => 'Campaign Preferences', - ); + ]; try{ $result = civicrm_api3('Setting', 'getvalue', $params); @@ -21,12 +21,12 @@ function setting_getvalue_example() { $errorMessage = $e->getMessage(); $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); - return array( + return [ 'is_error' => 1, 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, - ); + ]; } return $result;