@@ -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) |
@@ -1234,7 +1234,8 @@ discard block |
||
1234 | 1234 | // It's important to do the numbered ones before the named ones, or messes happen. |
1235 | 1235 | uksort( |
1236 | 1236 | $substitutions, |
1237 | - function($a, $b) { |
|
1237 | + function($a, $b) |
|
1238 | + { |
|
1238 | 1239 | if (is_int($a) && is_int($b)) |
1239 | 1240 | return $a > $b ? 1 : ($a < $b ? -1 : 0); |
1240 | 1241 | elseif (is_int($a)) |
@@ -1774,8 +1775,12 @@ discard block |
||
1774 | 1775 | unset($mtime, $settingsFile, $settingsText); |
1775 | 1776 | $defined_vars = get_defined_vars(); |
1776 | 1777 | } |
1777 | - catch (Throwable $e) {} |
|
1778 | - catch (ErrorException $e) {} |
|
1778 | + catch (Throwable $e) |
|
1779 | + { |
|
1780 | +} |
|
1781 | + catch (ErrorException $e) |
|
1782 | + { |
|
1783 | +} |
|
1779 | 1784 | if (isset($e)) |
1780 | 1785 | return false; |
1781 | 1786 |
@@ -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'; |
@@ -2163,12 +2160,12 @@ discard block |
||
2163 | 2160 | 'tag' => 'cowsay', |
2164 | 2161 | 'parameters' => array( |
2165 | 2162 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2166 | - { |
|
2163 | + { |
|
2167 | 2164 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2168 | 2165 | }, |
2169 | 2166 | ), |
2170 | 2167 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2171 | - { |
|
2168 | + { |
|
2172 | 2169 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2173 | 2170 | }, |
2174 | 2171 | ), |
@@ -2497,7 +2494,8 @@ discard block |
||
2497 | 2494 | |
2498 | 2495 | foreach (array('path', 'query', 'fragment') as $part) |
2499 | 2496 | { |
2500 | - switch ($part) { |
|
2497 | + switch ($part) |
|
2498 | + { |
|
2501 | 2499 | case 'path': |
2502 | 2500 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
2503 | 2501 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2814,7 +2812,9 @@ discard block |
||
2814 | 2812 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
2815 | 2813 | |
2816 | 2814 | // A closing tag that doesn't match any open tags? Skip it. |
2817 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
2815 | + if (!in_array($look_for, array_map(function($code) |
|
2816 | + { |
|
2817 | +return $code['tag']; }, $open_tags))) |
|
2818 | 2818 | continue; |
2819 | 2819 | |
2820 | 2820 | $to_close = array(); |
@@ -4365,7 +4365,6 @@ discard block |
||
4365 | 4365 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4366 | 4366 | $minSeed = $js_file['options']['seed']; |
4367 | 4367 | } |
4368 | - |
|
4369 | 4368 | else |
4370 | 4369 | { |
4371 | 4370 | echo ' |
@@ -6295,7 +6294,8 @@ discard block |
||
6295 | 6294 | $zones[$tzkey]['tzid'] = $tzid; |
6296 | 6295 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6297 | 6296 | |
6298 | - foreach ($tzinfo as $transition) { |
|
6297 | + foreach ($tzinfo as $transition) |
|
6298 | + { |
|
6299 | 6299 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6300 | 6300 | } |
6301 | 6301 | |
@@ -6785,7 +6785,6 @@ discard block |
||
6785 | 6785 | $isWritable = true; |
6786 | 6786 | break; |
6787 | 6787 | } |
6788 | - |
|
6789 | 6788 | else |
6790 | 6789 | @chmod($file, $val); |
6791 | 6790 | } |