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

Proposed fix for #237 #307

Closed
wants to merge 1 commit into from
Closed

Conversation

Synchro
Copy link
Contributor

@Synchro Synchro commented Apr 28, 2016

Resubmission of a clean version of #306

@Synchro
Copy link
Contributor Author

Synchro commented Apr 28, 2016

The build failure is an unrelated composer problem.

@oliverklee
Copy link
Contributor

I'll have a look at the composer problem.

@oliverklee
Copy link
Contributor

Hi @Synchro, could you also please add regression tests for this (i.e., unit tests that fail without the fix and that pass with it)? Thanks!

@Synchro
Copy link
Contributor Author

Synchro commented Apr 28, 2016

This test works for me - but another started failing. It turned out to be because it contained invalid markup so I fixed that.

@oliverklee
Copy link
Contributor

@Synchro I've just fixed the Composer-related breakage on master. Could you please rebase, force-push and then comment here? Thanks!

@Synchro
Copy link
Contributor Author

Synchro commented May 8, 2016

I've rebased, squashed and pushed.

'query' => $mediaQueries['query'][$key],
];
foreach ($mediaQueries as $query) {
if (!empty(trim($query[2]))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to put trim(...) into a local variable so the empty call also works in PHP 5.4:
https://travis-ci.org/jjriv/emogrifier/jobs/128679215#L181

@Synchro
Copy link
Contributor Author

Synchro commented May 8, 2016

Should work now!

oliverklee pushed a commit that referenced this pull request Jun 13, 2016
This fixes some noisy errors for empty media queries.

Fixes #237
Fixes #307
@oliverklee
Copy link
Contributor

Hi @Synchro, I've polished your PR a bit and pushed it as #319. Could you please check the polished version and comment there? Thanks!

oliverklee pushed a commit that referenced this pull request Jun 13, 2016
This fixes some noisy errors for empty media queries.

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

Successfully merging this pull request may close these issues.

2 participants