Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE_Option::format_style_selector() fails on some style_selectors #87

Open
boonebgorges opened this issue Jul 30, 2013 · 0 comments
Open

Comments

@boonebgorges
Copy link

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().

See cuny-academic-commons/cbox-theme#157, which I'm going to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant