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
When a style_selector does not contain a colon (like when it's 'body'), the following regex will only return a single match:
if ( preg_match( '/^(body[^:]*)(:[\w-]+)?/', $this->style_selector, $matches ) ) {
In these cases, $matches[2] is undefined (on the next line).
I'm not sure whether this causes any real problems - I'm not 100% sure what this method is supposed to be doing - but it does cause a PHP warning. Either you should fall through to the second condition ("not a body selector"), or provide a fallback value for the sprintf().
When a style_selector does not contain a colon (like when it's 'body'), the following regex will only return a single match:
In these cases,
$matches[2]
is undefined (on the next line).I'm not sure whether this causes any real problems - I'm not 100% sure what this method is supposed to be doing - but it does cause a PHP warning. Either you should fall through to the second condition ("not a body selector"), or provide a fallback value for the sprintf().
See cuny-academic-commons/cbox-theme#157, which I'm going to close.
The text was updated successfully, but these errors were encountered: