@@ -926,7 +926,8 @@ discard block |
||
926 | 926 | $error_array[2] = null; |
927 | 927 | |
928 | 928 | if(empty($db_persist)) |
929 | - { // without pooling |
|
929 | + { |
|
930 | +// without pooling |
|
930 | 931 | if (empty($pg_error_data_prep)) |
931 | 932 | $pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors', |
932 | 933 | 'INSERT INTO ' . $db_prefix . 'log_errors |
@@ -937,7 +938,8 @@ discard block |
||
937 | 938 | pg_execute($db_connection, 'smf_log_errors', $error_array); |
938 | 939 | } |
939 | 940 | else |
940 | - { //with pooling |
|
941 | + { |
|
942 | +//with pooling |
|
941 | 943 | $pg_error_data_prep = pg_prepare($db_connection, '', |
942 | 944 | 'INSERT INTO ' . $db_prefix . 'log_errors |
943 | 945 | (id_member, log_time, ip, url, message, session, error_type, file, line, backtrace) |
@@ -174,7 +174,8 @@ |
||
174 | 174 | } |
175 | 175 | } |
176 | 176 | |
177 | - $unnotified = array_filter($this->members['watching'], function ($member) { |
|
177 | + $unnotified = array_filter($this->members['watching'], function ($member) |
|
178 | + { |
|
178 | 179 | return empty($member['sent']); |
179 | 180 | }); |
180 | 181 |
@@ -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 | |
@@ -1973,7 +1978,8 @@ discard block |
||
1973 | 1978 | { |
1974 | 1979 | list($id, $text) = $token; |
1975 | 1980 | |
1976 | - switch ($id) { |
|
1981 | + switch ($id) |
|
1982 | + { |
|
1977 | 1983 | case T_COMMENT: |
1978 | 1984 | case T_DOC_COMMENT: |
1979 | 1985 | end($parts); |
@@ -2310,7 +2316,8 @@ discard block |
||
2310 | 2316 | // Search for a working temp directory. |
2311 | 2317 | foreach ($temp_dir_options as $id_temp => $temp_option) |
2312 | 2318 | { |
2313 | - switch ($temp_option) { |
|
2319 | + switch ($temp_option) |
|
2320 | + { |
|
2314 | 2321 | case 'cachedir': |
2315 | 2322 | $possible_temp = rtrim($cachedir, '/'); |
2316 | 2323 | break; |
@@ -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'; |
@@ -2167,12 +2164,12 @@ discard block |
||
2167 | 2164 | 'tag' => 'cowsay', |
2168 | 2165 | 'parameters' => array( |
2169 | 2166 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2170 | - { |
|
2167 | + { |
|
2171 | 2168 | return $smcFunc['substr']($eyes . 'oo', 0, 2); |
2172 | 2169 | }, |
2173 | 2170 | ), |
2174 | 2171 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2175 | - { |
|
2172 | + { |
|
2176 | 2173 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2177 | 2174 | }, |
2178 | 2175 | ), |
@@ -2501,7 +2498,8 @@ discard block |
||
2501 | 2498 | |
2502 | 2499 | foreach (array('path', 'query', 'fragment') as $part) |
2503 | 2500 | { |
2504 | - switch ($part) { |
|
2501 | + switch ($part) |
|
2502 | + { |
|
2505 | 2503 | case 'path': |
2506 | 2504 | $part_disallowed_chars = '<>' . $bracket_quote_chars . $space_chars . $excluded_trailing_chars . '/#&'; |
2507 | 2505 | $part_excluded_trailing_chars = str_replace('?', '', $excluded_trailing_chars); |
@@ -2818,7 +2816,9 @@ discard block |
||
2818 | 2816 | $look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2)); |
2819 | 2817 | |
2820 | 2818 | // A closing tag that doesn't match any open tags? Skip it. |
2821 | - if (!in_array($look_for, array_map(function($code) { return $code['tag']; }, $open_tags))) |
|
2819 | + if (!in_array($look_for, array_map(function($code) |
|
2820 | + { |
|
2821 | +return $code['tag']; }, $open_tags))) |
|
2822 | 2822 | continue; |
2823 | 2823 | |
2824 | 2824 | $to_close = array(); |
@@ -4378,7 +4378,6 @@ discard block |
||
4378 | 4378 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4379 | 4379 | $minSeed = $js_file['options']['seed']; |
4380 | 4380 | } |
4381 | - |
|
4382 | 4381 | else |
4383 | 4382 | { |
4384 | 4383 | echo ' |
@@ -6308,7 +6307,8 @@ discard block |
||
6308 | 6307 | $zones[$tzkey]['tzid'] = $tzid; |
6309 | 6308 | $zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0); |
6310 | 6309 | |
6311 | - foreach ($tzinfo as $transition) { |
|
6310 | + foreach ($tzinfo as $transition) |
|
6311 | + { |
|
6312 | 6312 | $zones[$tzkey]['abbrs'][] = $transition['abbr']; |
6313 | 6313 | } |
6314 | 6314 | |
@@ -6812,7 +6812,6 @@ discard block |
||
6812 | 6812 | $isWritable = true; |
6813 | 6813 | break; |
6814 | 6814 | } |
6815 | - |
|
6816 | 6815 | else |
6817 | 6816 | @chmod($file, $val); |
6818 | 6817 | } |