diff --git a/core/modules/color/color.module b/core/modules/color/color.module
index 8413c39..8a6e3a7 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module
@@ -6,6 +6,7 @@
use Drupal\Core\Asset\CssOptimizer;
use Drupal\Component\Utility\Bytes;
+use Drupal\Component\Utility\Enviroment;
use Drupal\Component\Utility\String;
use Symfony\Component\HttpFoundation\Request;
@@ -380,7 +381,7 @@ function color_scheme_form_submit($form, &$form_state) {
$usage = memory_get_usage(TRUE);
$memory_limit = ini_get('memory_limit');
$size = Bytes::toInt($memory_limit);
- if (!drupal_check_memory_limit($usage + $required, $memory_limit)) {
+ if (!Environment::checkMemoryLimit($usage + $required, $memory_limit)) {
drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the PHP documentation for more information.', array('%size' => format_size($usage + $required - $size), '@url' => 'http://www.php.net/manual/ini.core.php#ini.sect.resource-limits')), 'error');
return;
}
diff --git a/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php b/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php
index f350bd2..255edf8 100644
--- a/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php
+++ b/core/modules/editor/lib/Drupal/editor/Form/EditorImageDialog.php
@@ -7,6 +7,7 @@
namespace Drupal\editor\Form;
+use Drupal\Component\Utility\Bytes;
use Drupal\Core\Form\FormBase;
use Drupal\filter\Entity\FilterFormat;
use Drupal\Core\Ajax\AjaxResponse;
@@ -55,7 +56,7 @@ public function buildForm(array $form, array &$form_state, FilterFormat $filter_
else {
$max_dimensions = 0;
}
- $max_filesize = min(parse_size($image_upload['max_size']), file_upload_max_size());
+ $max_filesize = min(Bytes::toInt($image_upload['max_size']), file_upload_max_size());
$existing_file = isset($image_element['data-editor-file-uuid']) ? entity_load_by_uuid('file', $image_element['data-editor-file-uuid']) : NULL;
$fid = $existing_file ? $existing_file->id() : NULL;
diff --git a/core/modules/simpletest/simpletest.install b/core/modules/simpletest/simpletest.install
index 82e1ebb..223a6bf 100644
--- a/core/modules/simpletest/simpletest.install
+++ b/core/modules/simpletest/simpletest.install
@@ -5,6 +5,8 @@
* Install, update and uninstall functions for the simpletest module.
*/
+use Drupal\Component\Utility\Enviroment;
+
/**
* Minimum value of PHP memory_limit for SimpleTest.
*/
@@ -53,7 +55,7 @@ function simpletest_requirements($phase) {
// Check the current memory limit. If it is set too low, SimpleTest will fail
// to load all tests and throw a fatal error.
$memory_limit = ini_get('memory_limit');
- if (!drupal_check_memory_limit(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
+ if (!Environment::checkMemoryLimit(SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
$requirements['php_memory_limit']['severity'] = REQUIREMENT_ERROR;
$requirements['php_memory_limit']['description'] = t('The testing framework requires the PHP memory limit to be at least %memory_minimum_limit. The current value is %memory_limit. Follow these steps to continue.', array('%memory_limit' => $memory_limit, '%memory_minimum_limit' => SIMPLETEST_MINIMUM_PHP_MEMORY_LIMIT, '@url' => 'http://drupal.org/node/207036'));
}
diff --git a/core/modules/system/system.install b/core/modules/system/system.install
index 820efa7..28382e4 100644
--- a/core/modules/system/system.install
+++ b/core/modules/system/system.install
@@ -6,6 +6,7 @@
*/
use Drupal\Component\Utility\Crypt;
+use Drupal\Component\Utility\Enviroment;
use Drupal\Core\Database\Database;
use Drupal\Core\Language\Language;
use Drupal\Core\Site\Settings;
@@ -183,7 +184,7 @@ function system_requirements($phase) {
'value' => $memory_limit == -1 ? t('-1 (Unlimited)') : $memory_limit,
);
- if (!drupal_check_memory_limit(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
+ if (!Environment::checkMemoryLimit(DRUPAL_MINIMUM_PHP_MEMORY_LIMIT, $memory_limit)) {
$description = '';
if ($phase == 'install') {
$description = t('Consider increasing your PHP memory limit to %memory_minimum_limit to help prevent errors in the installation process.', array('%memory_minimum_limit' => DRUPAL_MINIMUM_PHP_MEMORY_LIMIT));