Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public static function post(Mailxpert $mailxpert, $name) |
||
33 | { |
||
34 | $response = $mailxpert->sendRequest('POST', 'contact_lists', [], null, json_encode(['name' => $name])); |
||
35 | |||
36 | if (!$response->getHeader('Location')) { |
||
|
|||
37 | throw new MailxpertSDKException('An error occured during the Contact list creation.'); |
||
38 | } |
||
39 | |||
40 | return $response; |
||
41 | } |
||
42 | } |
||
43 |
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: