X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=a08297a6474ed5976dea52aba9cb92a1eec146c8;hb=23361af7fd58d576c6c9a1315c98580d8052748c;hp=777eddd1927447ecd25c636c3576c206ad92fce2;hpb=a92a23e8a24456c56957144808eb8d62a07a227c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 777eddd192..a08297a647 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -752,17 +752,19 @@ abstract class Maintenance { if ( isset( $this->mParams[$option] ) ) { $multi = $this->mParams[$option]['multiOccurrence']; - $exists = array_key_exists( $option, $options ); - if ( $multi && $exists ) { - $options[$option][] = $value; - } elseif ( $multi ) { - $options[$option] = [ $value ]; - } elseif ( !$exists ) { - $options[$option] = $value; - } else { - $this->error( "\nERROR: $option parameter given twice\n" ); - $this->maybeHelp( true ); - } + } else { + $multi = false; + } + $exists = array_key_exists( $option, $options ); + if ( $multi && $exists ) { + $options[$option][] = $value; + } elseif ( $multi ) { + $options[$option] = [ $value ]; + } elseif ( !$exists ) { + $options[$option] = $value; + } else { + $this->error( "\nERROR: $option parameter given twice\n" ); + $this->maybeHelp( true ); } }