You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the element does not have a bgcolor attribute, php does not evaluate the second part of the condition, and the code continues executing without issue. If the element does have a bgcolor attribute, the in_array portion of the condition is evaluated, causing a critical error:
Uncaught PHP Exception TypeError: "in_array(): Argument #2 ($haystack) must be of type array, null given" at /var/www/html/vendor/cidilabs/phpally/src/Rule/BaseRule.php line 169
Which appears to be saying that $this->deprecated_style_elements is null. I did a search for deprecated_style_elements in the rest of the codebase, and did not find another mention of it, so it appears that this value is never defined, hence why it is null. It seems like the in_array check isn't really necessary, since it shouldn't matter what element we're pulling the bgcolor attribute from.
The text was updated successfully, but these errors were encountered:
When phpally grabs the style of an element, the following condition is evaluated: https://github.com/cidilabs/phpally/blob/master/src/Rule/BaseRule.php#L170
If the element does not have a
bgcolor
attribute, php does not evaluate the second part of the condition, and the code continues executing without issue. If the element does have abgcolor
attribute, thein_array
portion of the condition is evaluated, causing a critical error:Which appears to be saying that
$this->deprecated_style_elements
is null. I did a search fordeprecated_style_elements
in the rest of the codebase, and did not find another mention of it, so it appears that this value is never defined, hence why it is null. It seems like thein_array
check isn't really necessary, since it shouldn't matter what element we're pulling thebgcolor
attribute from.The text was updated successfully, but these errors were encountered: