From 2c69095a1edf7474073451285238659d0f62ce3f Mon Sep 17 00:00:00 2001 From: Appleman1234 Date: Sun, 25 Sep 2022 13:30:13 +1000 Subject: PHP8.1 fixes from Rector --- tools/rebuild.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/rebuild.php') diff --git a/tools/rebuild.php b/tools/rebuild.php index 289523a1..9adb183b 100755 --- a/tools/rebuild.php +++ b/tools/rebuild.php @@ -19,18 +19,18 @@ * */ -require dirname(__FILE__) . '/inc/cli.php'; +require __DIR__ . '/inc/cli.php'; require_once("inc/bans.php"); $start = microtime(true); // parse command line -$opts = getopt('qfb:', Array('board:', 'quick', 'full', 'quiet')); -$options = Array(); +$opts = getopt('qfb:', ['board:', 'quick', 'full', 'quiet']); +$options = []; $global_locale = $config['locale']; -$options['board'] = isset($opts['board']) ? $opts['board'] : (isset($opts['b']) ? $opts['b'] : false); +$options['board'] = $opts['board'] ?? $opts['b'] ?? false; $options['quiet'] = isset($opts['q']) || isset($opts['quiet']); $options['quick'] = isset($opts['quick']); $options['full'] = isset($opts['full']) || isset($opts['f']); -- cgit v1.3