@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | if (empty(self::$id) && isset($_COOKIE[$cookiename])) |
104 | 104 | { |
105 | - [$id, self::$session_password] = serializeToJson($_COOKIE[$cookiename], static function ($array_from) use ($cookiename) { |
|
105 | + [$id, self::$session_password] = serializeToJson($_COOKIE[$cookiename], static function($array_from) use ($cookiename) { |
|
106 | 106 | global $modSettings; |
107 | 107 | require_once(SUBSDIR . '/Auth.subs.php'); |
108 | 108 | $_COOKIE[$cookiename] = json_encode($array_from); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | elseif (empty(self::$id) && isset($_SESSION['login_' . $cookiename]) && (!empty($modSettings['disableCheckUA']) || (!empty($_SESSION['USER_AGENT']) && $_SESSION['USER_AGENT'] == $user_agent))) |
115 | 115 | { |
116 | 116 | // @todo Perhaps we can do some more checking on this, such as on the first octet of the IP? |
117 | - [$id, self::$session_password, $login_span] = serializeToJson($_SESSION['login_' . $cookiename], static function ($array_from) use ($cookiename) { |
|
117 | + [$id, self::$session_password, $login_span] = serializeToJson($_SESSION['login_' . $cookiename], static function($array_from) use ($cookiename) { |
|
118 | 118 | $_SESSION['login_' . $cookiename] = json_encode($array_from); |
119 | 119 | }); |
120 | 120 |
@@ -80,7 +80,7 @@ |
||
80 | 80 | global $modSettings, $context; |
81 | 81 | |
82 | 82 | // What shall we do? |
83 | - $dispatcher = new ElkArte\SiteDispatcher( HttpReq::instance()); |
|
83 | + $dispatcher = new ElkArte\SiteDispatcher(HttpReq::instance()); |
|
84 | 84 | |
85 | 85 | if ($dispatcher->needSecurity()) |
86 | 86 | { |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | 'not_installed' => 0, |
170 | 170 | ] |
171 | 171 | )->fetch_callback( |
172 | - function ($row) use (&$found, &$installed) { |
|
172 | + function($row) use (&$found, &$installed) { |
|
173 | 173 | // Already found this? If so don't add it twice! |
174 | 174 | if (in_array((int) $row['package_id'], $found, true)) |
175 | 175 | { |
@@ -1528,7 +1528,7 @@ discard block |
||
1528 | 1528 | $fileFunc = FileFunctions::instance(); |
1529 | 1529 | |
1530 | 1530 | // The files that reside outside of sources, in the base, we add manually |
1531 | - $base_files = ['index.php', 'SSI.php', 'subscriptions.php', 'email_imap_cron.php', 'emailpost.php', 'emailtopic.php']; |
|
1531 | + $base_files = ['index.php', 'SSI.php', 'subscriptions.php', 'email_imap_cron.php', 'emailpost.php', 'emailtopic.php']; |
|
1532 | 1532 | foreach ($base_files as $file) |
1533 | 1533 | { |
1534 | 1534 | if ($fileFunc->fileExists(BOARDDIR . '/' . $file)) |
@@ -1554,7 +1554,7 @@ discard block |
||
1554 | 1554 | 'theme_dir' => 'theme_dir', |
1555 | 1555 | ] |
1556 | 1556 | )->fetch_callback( |
1557 | - function ($row) use (&$dirs, $use_relative_paths) { |
|
1557 | + function($row) use (&$dirs, $use_relative_paths) { |
|
1558 | 1558 | $dirs[$row['value']] = $use_relative_paths ? 'themes/' . basename($row['value']) . '/' : strtr($row['value'] . '/', '\\', '/'); |
1559 | 1559 | } |
1560 | 1560 | ); |
@@ -1774,7 +1774,7 @@ discard block |
||
1774 | 1774 | 'install_id' => $install_id, |
1775 | 1775 | ] |
1776 | 1776 | )->fetch_callback( |
1777 | - function ($row) use (&$result) { |
|
1777 | + function($row) use (&$result) { |
|
1778 | 1778 | $result = [ |
1779 | 1779 | 'old_themes' => explode(',', $row['themes_installed']), |
1780 | 1780 | 'old_version' => $row['version'], |
@@ -1844,7 +1844,7 @@ discard block |
||
1844 | 1844 | 'current_package' => $id, |
1845 | 1845 | ] |
1846 | 1846 | )->fetch_callback( |
1847 | - function ($row) use (&$version) { |
|
1847 | + function($row) use (&$version) { |
|
1848 | 1848 | $version = $row['version']; |
1849 | 1849 | } |
1850 | 1850 | ); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | 'redirect_expires' => time(), |
55 | 55 | ] |
56 | 56 | )->fetch_callback( |
57 | - static function ($row) use (&$topics) { |
|
57 | + static function($row) use (&$topics) { |
|
58 | 58 | if (isset($row[0])) |
59 | 59 | { |
60 | 60 | $topics[] = (int) $row[0]; |
@@ -1722,7 +1722,7 @@ |
||
1722 | 1722 | } |
1723 | 1723 | |
1724 | 1724 | $found = false; |
1725 | - $url = preg_replace_callback($pattern, static function ($match) use (&$found) { |
|
1725 | + $url = preg_replace_callback($pattern, static function($match) use (&$found) { |
|
1726 | 1726 | $found = true; |
1727 | 1727 | |
1728 | 1728 | return strtolower($match[0]); |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | } |
619 | 619 | |
620 | 620 | // Attempt to unserialize, mask errors |
621 | - set_error_handler(static function () { /* ignore errors */ }); |
|
621 | + set_error_handler(static function() { /* ignore errors */ }); |
|
622 | 622 | try |
623 | 623 | { |
624 | 624 | if (unserialize($string, ['allowed_classes' => false]) !== false) |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | |
710 | 710 | return preg_replace_callback( |
711 | 711 | '/%[A-Za-z]{1}/', |
712 | - static function ($matches) use ($timestamp, $date_equivalents) { |
|
712 | + static function($matches) use ($timestamp, $date_equivalents) { |
|
713 | 713 | $new_format = str_replace(array_keys($date_equivalents), array_values($date_equivalents), $matches[0]); |
714 | 714 | return date($new_format, $timestamp); |
715 | 715 | }, |
@@ -266,7 +266,7 @@ |
||
266 | 266 | * |
267 | 267 | * @return bool |
268 | 268 | */ |
269 | - public function isSet($key) |
|
269 | + public function isset($key) |
|
270 | 270 | { |
271 | 271 | return $this->__isset($key); |
272 | 272 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | static fn(string $sessionId): string => $handler->read($sessionId), |
90 | 90 | static fn(string $sessionId, string $data): bool => $handler->write($sessionId, $data), |
91 | 91 | static fn(string $sessionId): bool => $handler->destroy($sessionId), |
92 | - static fn(int $maxLifetime): int|bool => $handler->gc($maxLifetime) |
|
92 | + static fn(int $maxLifetime): int | bool => $handler->gc($maxLifetime) |
|
93 | 93 | ); |
94 | 94 | |
95 | 95 | /* |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | 'name' => $board_info['cat']['name'] |
447 | 447 | ) |
448 | 448 | ), |
449 | - array_reverse($board_info['parent_boards']), [ |
|
449 | + array_reverse($board_info['parent_boards']), [ |
|
450 | 450 | [ |
451 | 451 | 'url' => getUrl('board', ['board' => $board, 'start' => '0', 'name' => $board_info['name']]), |
452 | 452 | 'name' => $board_info['name'] |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
596 | 596 | ] |
597 | 597 | )->fetch_callback( |
598 | - static function ($row) use (&$removals, &$permissions) { |
|
598 | + static function($row) use (&$removals, &$permissions) { |
|
599 | 599 | if (empty($row['add_deny'])) |
600 | 600 | { |
601 | 601 | $removals[] = $row['permission']; |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | 'spider_group' => !empty($modSettings['spider_group']) && $modSettings['spider_group'] != 1 ? $modSettings['spider_group'] : 0, |
636 | 636 | ) |
637 | 637 | )->fetch_callback( |
638 | - static function ($row) use (&$removals, &$permissions) { |
|
638 | + static function($row) use (&$removals, &$permissions) { |
|
639 | 639 | if (empty($row['add_deny'])) |
640 | 640 | { |
641 | 641 | $removals[] = $row['permission']; |