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/i18n_extract.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tools/i18n_extract.php') diff --git a/tools/i18n_extract.php b/tools/i18n_extract.php index fe501a37..66ccbc74 100755 --- a/tools/i18n_extract.php +++ b/tools/i18n_extract.php @@ -10,18 +10,18 @@ * */ -require dirname(__FILE__) . '/inc/cli.php'; +require __DIR__ . '/inc/cli.php'; // parse command line -$opts = getopt('l:', Array('locale:')); -$options = Array(); +$opts = getopt('l:', ['locale:']); +$options = []; -$options['locale'] = isset($opts['l']) ? $opts['l'] : (isset($opts['locale']) ? $opts['locale'] : false); +$options['locale'] = $opts['l'] ?? $opts['locale'] ?? false; $locales = glob("inc/locale/*"); $locales = array_map("basename", $locales); -if ($options['locale']) $locales = array($options['locale']); +if ($options['locale']) $locales = [$options['locale']]; foreach ($locales as $loc) { -- cgit v1.3