mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Require PHP7.4 compatible fork of phpunit-mock-objects
This commit is contained in:
parent
d8014d3110
commit
b250e14ace
@ -32,7 +32,7 @@ matrix:
|
|||||||
env: DB=SQLITE
|
env: DB=SQLITE
|
||||||
|
|
||||||
- php: 7.4snapshot
|
- php: 7.4snapshot
|
||||||
env: DB=SQLITE
|
env: DB=SQLITE INSTALL_PHPUNIT_FORK=1
|
||||||
|
|
||||||
# CMS test
|
# CMS test
|
||||||
- php: 5.5
|
- php: 5.5
|
||||||
@ -58,6 +58,7 @@ before_script:
|
|||||||
- if ! [ $(phpenv version-name) = "5.3" ]; then printf "\n" | travis_retry pecl install imagick; fi
|
- if ! [ $(phpenv version-name) = "5.3" ]; then printf "\n" | travis_retry pecl install imagick; fi
|
||||||
- if [ $(phpenv version-name) = "5.3" ]; then printf "\n" | travis_retry pecl install imagick-3.3.0; fi
|
- if [ $(phpenv version-name) = "5.3" ]; then printf "\n" | travis_retry pecl install imagick-3.3.0; fi
|
||||||
- composer self-update || true
|
- composer self-update || true
|
||||||
|
- if [ $INSTALL_PHPUNIT_FORK ]; then composer require --no-update --dev sminnee/phpunit-mock-objects:^3.4.7; fi
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
- phpenv config-rm xdebug.ini || true
|
- phpenv config-rm xdebug.ini || true
|
||||||
- echo 'memory_limit = 3G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
- echo 'memory_limit = 3G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^3 || ^4 || ^5"
|
"phpunit/phpunit": "^3 || ^4 || ^5"
|
||||||
},
|
},
|
||||||
"extra": [],
|
"extra": [],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
@ -63,4 +63,4 @@
|
|||||||
"core/compat"
|
"core/compat"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,11 @@ class GDBackend extends SS_Object implements Image_Backend {
|
|||||||
$bytesPerPixel = $bits * $channels;
|
$bytesPerPixel = $bits * $channels;
|
||||||
|
|
||||||
// width * height * bytes per pixel
|
// width * height * bytes per pixel
|
||||||
$memoryRequired = $imageInfo[0] * $imageInfo[1] * $bytesPerPixel;
|
if ($imageInfo) {
|
||||||
|
$memoryRequired = $imageInfo[0] * $imageInfo[1] * $bytesPerPixel;
|
||||||
|
} else {
|
||||||
|
$memoryRequired = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return $memoryRequired + memory_get_usage() < $limit;
|
return $memoryRequired + memory_get_usage() < $limit;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user