1 | <?php |
||
11 | class Htmlawed { |
||
12 | /// Methods /// |
||
13 | |||
14 | public static $defaultConfig = [ |
||
15 | 'anti_link_spam' => ['`.`', ''], |
||
16 | 'balance' => 1, |
||
17 | 'cdata' => 3, |
||
18 | 'comment' => 1, |
||
19 | 'css_expression' => 0, |
||
20 | 'deny_attribute' => 'on*,style', |
||
21 | 'direct_list_nest' => 1, |
||
22 | 'elements' => '*-applet-button-form-input-textarea-iframe-script-style-embed-object', |
||
23 | 'keep_bad' => 0, |
||
24 | 'schemes' => 'classid:clsid; href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, telnet; style: nil; *:file, http, https', // clsid allowed in class |
||
25 | 'unique_ids' => 0, |
||
26 | 'valid_xhtml' => 0, |
||
27 | ]; |
||
28 | |||
29 | public static $defaultSpec = [ |
||
30 | 'object=-classid-type, -codebase', |
||
31 | 'embed=type(oneof=application/x-shockwave-flash)' |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * Filters a string of html with the htmLawed library. |
||
36 | * |
||
37 | * @param string $html The text to filter. |
||
38 | * @param array|null $config Config settings for the array. |
||
39 | * @param string|array|null $spec A specification to further limit the allowed attribute values in the html. |
||
40 | * @return string Returns the filtered html. |
||
41 | * @see http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/htmLawed_README.htm |
||
42 | */ |
||
43 | 1731 | public static function filter($html, array $config = null, $spec = null) { |
|
60 | |||
61 | |||
62 | /** |
||
63 | * Filter a string of html so that it can be put into an rss feed. |
||
64 | * |
||
65 | * @param $html The html text to fitlter. |
||
66 | * @return string Returns the filtered html. |
||
67 | * @see Htmlawed::filter(). |
||
68 | */ |
||
69 | 559 | public static function filterRSS($html) { |
|
88 | } |
||
89 |
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: