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

Filters are being ignored #95

Closed
ghost opened this issue Feb 2, 2012 · 1 comment
Closed

Filters are being ignored #95

ghost opened this issue Feb 2, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 2, 2012

All filters[] in config are ignored.

The reason is in Lib/AssetConfig::filters(). It expects filters to be in $this->_data[$ext][self::FILTERS], otherwise it returns an empty array and no filters are proccessed. But filters comes in $this->_data[$ext][self::TARGETS][$target][self::FILTERS].

Commenting out the following lines solves the problem (filters are proccessed just after this, in the very same function):
// if (!isset($this->_data[$ext][self::FILTERS])) {
// return array();
// }

@ghost
Copy link
Author

ghost commented Feb 2, 2012

More generically, I've changed this:

if (!isset($this->_data[$ext][self::FILTERS])) {
return array();
}
$filters = (array)$this->_data[$ext][self::FILTERS];

to this:
if (!isset($this->_data[$ext][self::FILTERS])) {
$filters = array();
} else {
$filters = (array)$this->_data[$ext][self::FILTERS];
}

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