Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function parse($raw_message) |
||
25 | { |
||
26 | list($headers, $content) = \explode("\n\n", $raw_message, 2); |
||
27 | |||
28 | $data = array( |
||
29 | 'to' => NULL, |
||
30 | 'subject' => NULL, |
||
31 | 'content' => \quoted_printable_decode($content) |
||
32 | ); |
||
33 | |||
34 | $data['links'] = $this->parseLinksFromContent($data['content']); |
||
35 | $data['to'] = $this->parseRecipient($headers); |
||
36 | |||
37 | if (\preg_match('/^Subject:\s+(.+?)$/m', $headers, $matches)) |
||
38 | { |
||
39 | $data['subject'] = $matches[1]; |
||
40 | } |
||
41 | |||
42 | return new Email($data); |
||
|
|||
43 | } |
||
44 | |||
79 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: