Skip to content

Commit

Permalink
#3039 : Fixed numeric notice in PHP 7.x. (#3040)
Browse files Browse the repository at this point in the history
  • Loading branch information
zero2one authored and greg-1-anderson committed Oct 9, 2017
1 parent a2a4ebd commit 46042c9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -886,16 +886,17 @@ function drush_errors_on($errors = null) {
function drush_memory_limit() {
$value = trim(ini_get('memory_limit'));
$last = strtolower($value[strlen($value)-1]);
$size = (int) substr($value, 0, -1);
switch ($last) {
case 'g':
$value *= DRUSH_KILOBYTE;
$size *= DRUSH_KILOBYTE;
case 'm':
$value *= DRUSH_KILOBYTE;
$size *= DRUSH_KILOBYTE;
case 'k':
$value *= DRUSH_KILOBYTE;
$size *= DRUSH_KILOBYTE;
}

return $value;
return $size;
}

/**
Expand Down

0 comments on commit 46042c9

Please sign in to comment.