Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
39 | public static function post(Mailxpert $mailxpert, $customFieldId, array $params) |
||
40 | { |
||
41 | $response = $mailxpert->sendRequest('POST', sprintf('custom_fields/%s/choices', $customFieldId), [], null, json_encode($params)); |
||
42 | |||
43 | if (!$response->getHeader('Location')) { |
||
|
|||
44 | throw new MailxpertSDKException('An error occured during the Contactfield Choice creation.'); |
||
45 | } |
||
46 | |||
47 | return $response; |
||
48 | } |
||
49 | } |
||
50 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: