Skip to content

Commit

Permalink
no need to use tru/false for allow old php
Browse files Browse the repository at this point in the history
  • Loading branch information
gianluigi-icit committed May 12, 2020
1 parent 6fd5489 commit 0f8cdac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions srdb.cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
[ '', 'ssl-cipher:', 'Define the cipher to use for SSL.', ],
[ '', 'ssl-check:', 'Check the SSL certificate, default to True.', '[true|false]' ],

[ '', 'allow-old-php:', 'Suppress the check for PHP version, use it at your own risk!', '[true|false]' ],
[ '', 'allow-old-php', 'Suppress the check for PHP version, use it at your own risk!' ],

[ '', 'help', 'Displays this help message ;)', ],
);
Expand Down Expand Up @@ -187,6 +187,10 @@ function strip_colons( $string ) {
'allow_old_php' => false
);

if ( isset( $options['allow-old-php'] ) ) {
$args['allow_old_php'] = true;
}

// create $args array
foreach ( $options as $key => $value ) {

Expand All @@ -209,7 +213,6 @@ function strip_colons( $string ) {
// boolean options.
case 'debug':
case 'ssl-check':
case 'allow-old-php':
case 'verbose':
$value = (boolean) filter_var( $value, FILTER_VALIDATE_BOOLEAN );
break;
Expand Down

0 comments on commit 0f8cdac

Please sign in to comment.