Skip to content

Commit

Permalink
Fixed deprecation warning in PHP ≥ 7.4.0 (#2043)
Browse files Browse the repository at this point in the history
  • Loading branch information
TeslaDethray authored Jan 3, 2020
1 parent ad45eec commit dcff9b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ All notable changes to this project will be documented in this file. This projec
### Deprecated
- Deprecated the `--cc` option on `env:deploy`. Please use `env:clear-cache` instead. (#2022)

### Fixed
- PHP Deprecated warnings seen in PHP ≥ 7.4.0 (#2043)

## 2.2.0 - 2019-09-26
### Added
- Added `primary` field to the output of `domain:list`. (#2011)
Expand Down
5 changes: 4 additions & 1 deletion src/Commands/Env/MetricsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ protected function validateItemWithinRange(
if (in_array($value, $exceptional_values)) {
return;
}
$or_one_of = (count($exceptional_values) == 0) ? '' : (count($exceptional_values) == 1) ? 'or ' : 'or one of ';
$or_one_of = '';
if (count($exceptional_values) != 0) {
$or_one_of = (count($exceptional_values) == 1) ? 'or ' : 'or one of ';
}
if (($value < $minimum) || ($value > $maximum)) {
throw new TerminusException(
"'{value}' is an invalid value for {option_name}: "
Expand Down

0 comments on commit dcff9b7

Please sign in to comment.