Conditions | 3 |
Paths | 3 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
8 | public function sendHTML( |
||
9 | $to, |
||
10 | $from, |
||
11 | $subject, |
||
12 | $htmlContent, |
||
13 | $attachedFiles = false, |
||
14 | $customheaders = false, |
||
15 | $plainContent = false |
||
16 | ) { |
||
17 | $cssFileLocation = Director::baseFolder() .'/'. Config::inst()->get("EmailReminder_Mailer", "css_file"); |
||
18 | if ($cssFileLocation) { |
||
19 | if (file_exists($cssFileLocation)) { |
||
20 | $cssFileHandler = fopen($cssFileLocation, 'r'); |
||
21 | $css = fread($cssFileHandler, filesize($cssFileLocation)); |
||
22 | fclose($cssFileHandler); |
||
23 | $emog = new \Pelago\Emogrifier($htmlContent, $css); |
||
24 | $htmlContent = $emog->emogrify(); |
||
25 | } |
||
26 | } |
||
27 | return parent::sendHTML( |
||
28 | $to, |
||
29 | $from, |
||
30 | $subject, |
||
31 | $htmlContent, |
||
32 | $attachedFiles, |
||
|
|||
33 | $customheaders, |
||
34 | $plainContent |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 |
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: