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

Image::place() converts percentage arguments to numeric value #122

Merged
merged 1 commit into from Oct 24, 2016

Conversation

@PavelJurasek
Copy link
Contributor

PavelJurasek commented Oct 19, 2016

Fixes compatibility with PHP 7.1 as it caused E_NOTICE: A non well formed numeric value encountered in Image.php:474.

@dg

This comment has been minimized.

@PavelJurasek PavelJurasek force-pushed the PavelJurasek:patch-1 branch from efb19fe to 61c334f Oct 19, 2016
@PavelJurasek

This comment has been minimized.

Copy link
Contributor Author

PavelJurasek commented Oct 19, 2016

Done

@PavelJurasek

This comment has been minimized.

Copy link
Contributor Author

PavelJurasek commented Oct 20, 2016

Is anything else needed?

@dg

This comment has been minimized.

Copy link
Member

dg commented Oct 22, 2016

abs() is missing

@PavelJurasek PavelJurasek force-pushed the PavelJurasek:patch-1 branch from 61c334f to 812b3f5 Oct 22, 2016
@PavelJurasek

This comment has been minimized.

Copy link
Contributor Author

PavelJurasek commented Oct 22, 2016

Fixed

@dg

This comment has been minimized.

Copy link
Member

dg commented Oct 24, 2016

Thanks

@dg dg merged commit 53e7466 into nette:master Oct 24, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.1%) to 89.051%
Details
dg added a commit that referenced this pull request Oct 26, 2016
@@ -322,14 +322,14 @@ public function resize($width, $height, $flags = self::FIT)
public static function calculateSize($srcWidth, $srcHeight, $newWidth, $newHeight, $flags = self::FIT)
{
if (is_string($newWidth) && substr($newWidth, -1) === '%') {
$newWidth = (int) round($srcWidth / 100 * abs($newWidth));
$newWidth = (int) round($srcWidth / 100 * substr($newWidth, 0, -1));

This comment has been minimized.

Copy link
@dg

dg May 2, 2017

Member

I think that abs() should stay here

This comment has been minimized.

Copy link
@PavelJurasek

PavelJurasek May 2, 2017

Author Contributor

8683a0b was merged. abs is present in that commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.