@@ -979,7 +979,8 @@ discard block |
||
| 979 | 979 | $error_array[2] = null; |
| 980 | 980 | |
| 981 | 981 | if(empty($db_persist)) |
| 982 | - { // without pooling |
|
| 982 | + { |
|
| 983 | +// without pooling |
|
| 983 | 984 | if (empty($pg_error_data_prep)) |
| 984 | 985 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
| 985 | 986 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -990,7 +991,8 @@ discard block |
||
| 990 | 991 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
| 991 | 992 | } |
| 992 | 993 | else |
| 993 | - { //with pooling |
|
| 994 | + { |
|
| 995 | +//with pooling |
|
| 994 | 996 | $pg_error_data_prep = pg_prepare($db_connection, '', |
| 995 | 997 | 'INSERT INTO ' . $db_prefix . 'log_errors |
| 996 | 998 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -280,7 +280,6 @@ discard block |
||
| 280 | 280 | $condition = 'id_member IN ({array_int:members})'; |
| 281 | 281 | $parameters['members'] = $members; |
| 282 | 282 | } |
| 283 | - |
|
| 284 | 283 | elseif ($members === null) |
| 285 | 284 | $condition = '1=1'; |
| 286 | 285 | |
@@ -383,11 +382,9 @@ discard block |
||
| 383 | 382 | $val = $val . ' END'; |
| 384 | 383 | $type = 'raw'; |
| 385 | 384 | } |
| 386 | - |
|
| 387 | 385 | else |
| 388 | 386 | $val = alert_count($members, true); |
| 389 | 387 | } |
| 390 | - |
|
| 391 | 388 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
| 392 | 389 | { |
| 393 | 390 | $val = $var . ' ' . $val . ' 1'; |
@@ -2160,12 +2157,12 @@ discard block |
||
| 2160 | 2157 | 'tag' => 'cowsay', |
| 2161 | 2158 | 'parameters' => array( |
| 2162 | 2159 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
| 2163 | - { |
|
| 2160 | + { |
|
| 2164 | 2161 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
| 2165 | 2162 | }, |
| 2166 | 2163 | ), |
| 2167 | 2164 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
| 2168 | - { |
|
| 2165 | + { |
|
| 2169 | 2166 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
| 2170 | 2167 | }, |
| 2171 | 2168 | ), |
@@ -2494,7 +2491,8 @@ discard block |
||
| 2494 | 2491 | |
| 2495 | 2492 | foreach (array('path', 'query', 'fragment') as $part) |
| 2496 | 2493 | { |
| 2497 | - switch ($part) { |
|
| 2494 | + switch ($part) |
|
| 2495 | + { |
|
| 2498 | 2496 | case 'path': |
| 2499 | 2497 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
| 2500 | 2498 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2811,7 +2809,9 @@ discard block |
||
| 2811 | 2809 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
| 2812 | 2810 | |
| 2813 | 2811 | // A closing tag that doesn't match any open tags? Skip it. |
| 2814 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
| 2812 | + if (!in_array($look_for, array_map(function($code) |
|
| 2813 | + { |
|
| 2814 | +return $code['tag']; }, $open_tags))) |
|
| 2815 | 2815 | continue; |
| 2816 | 2816 | |
| 2817 | 2817 | $to_close = array(); |
@@ -4362,7 +4362,6 @@ discard block |
||
| 4362 | 4362 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
| 4363 | 4363 | $minSeed = $js_file['options']['seed']; |
| 4364 | 4364 | } |
| 4365 | - |
|
| 4366 | 4365 | else |
| 4367 | 4366 | { |
| 4368 | 4367 | echo ' |
@@ -6288,7 +6287,8 @@ discard block |
||
| 6288 | 6287 | $zones[$tzkey]['tzid'] = $tzid; |
| 6289 | 6288 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
| 6290 | 6289 | |
| 6291 | - foreach ($tzinfo as $transition) { |
|
| 6290 | + foreach ($tzinfo as $transition) |
|
| 6291 | + { |
|
| 6292 | 6292 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
| 6293 | 6293 | } |
| 6294 | 6294 | |
@@ -6373,7 +6373,8 @@ discard block |
||
| 6373 | 6373 | $desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : ''); |
| 6374 | 6374 | |
| 6375 | 6375 | // We don't want abbreviations like '+03' or '-11'. |
| 6376 | - $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) { |
|
| 6376 | + $abbrs = array_filter($tzvalue['abbrs'], function ($abbr) |
|
| 6377 | + { |
|
| 6377 | 6378 | return !strspn($abbr, '+-'); |
| 6378 | 6379 | }); |
| 6379 | 6380 | $abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array(); |
@@ -6774,7 +6775,6 @@ discard block |
||
| 6774 | 6775 | $isWritable = true; |
| 6775 | 6776 | break; |
| 6776 | 6777 | } |
| 6777 | - |
|
| 6778 | 6778 | else |
| 6779 | 6779 | @chmod($file, $val); |
| 6780 | 6780 | } |
@@ -1232,7 +1232,8 @@ discard block |
||
| 1232 | 1232 | } |
| 1233 | 1233 | |
| 1234 | 1234 | // It's important to do the numbered ones before the named ones, or messes happen. |
| 1235 | - uksort($substitutions, function($a, $b) { |
|
| 1235 | + uksort($substitutions, function($a, $b) |
|
| 1236 | + { |
|
| 1236 | 1237 | if (is_int($a) && is_int($b)) |
| 1237 | 1238 | return $a > $b ? 1 : ($a < $b ? -1 : 0); |
| 1238 | 1239 | elseif (is_int($a)) |
@@ -1771,8 +1772,12 @@ discard block |
||
| 1771 | 1772 | unset($mtime, $settingsFile, $settingsText); |
| 1772 | 1773 | $defined_vars = get_defined_vars(); |
| 1773 | 1774 | } |
| 1774 | - catch (Throwable $e) {} |
|
| 1775 | - catch (ErrorException $e) {} |
|
| 1775 | + catch (Throwable $e) |
|
| 1776 | + { |
|
| 1777 | +} |
|
| 1778 | + catch (ErrorException $e) |
|
| 1779 | + { |
|
| 1780 | +} |
|
| 1776 | 1781 | if (isset($e)) |
| 1777 | 1782 | return false; |
| 1778 | 1783 | |