@@ -306,7 +306,6 @@ discard block |
||
306 | 306 | $condition = 'id_member IN ({array_int:members})'; |
307 | 307 | $parameters['members'] = $members; |
308 | 308 | } |
309 | - |
|
310 | 309 | elseif ($members === null) |
311 | 310 | $condition = '1=1'; |
312 | 311 | |
@@ -409,11 +408,9 @@ discard block |
||
409 | 408 | $val = $val . ' END'; |
410 | 409 | $type = 'raw'; |
411 | 410 | } |
412 | - |
|
413 | 411 | else |
414 | 412 | $val = alert_count($members, true); |
415 | 413 | } |
416 | - |
|
417 | 414 | elseif ($type == 'int' && ($val === '+' || $val === '-')) |
418 | 415 | { |
419 | 416 | $val = $var . ' ' . $val . ' 1'; |
@@ -2211,7 +2208,7 @@ discard block |
||
2211 | 2208 | 'tag' => 'cowsay', |
2212 | 2209 | 'parameters' => array( |
2213 | 2210 | 'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc) |
2214 | - { |
|
2211 | + { |
|
2215 | 2212 | static $css_added; |
2216 | 2213 | |
2217 | 2214 | if (empty($css_added)) |
@@ -2228,7 +2225,7 @@ discard block |
||
2228 | 2225 | }, |
2229 | 2226 | ), |
2230 | 2227 | 't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => ' ', 'validate' => function ($tongue) use ($smcFunc) |
2231 | - { |
|
2228 | + { |
|
2232 | 2229 | return $smcFunc['substr']($tongue . ' ', 0, 2); |
2233 | 2230 | }, |
2234 | 2231 | ), |
@@ -3326,7 +3323,7 @@ discard block |
||
3326 | 3323 | |
3327 | 3324 | // Replace away! |
3328 | 3325 | $message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements) |
3329 | - { |
|
3326 | + { |
|
3330 | 3327 | return $smileyPregReplacements[$matches[1]]; |
3331 | 3328 | }, $message); |
3332 | 3329 | } |
@@ -4113,7 +4110,6 @@ discard block |
||
4113 | 4110 | if (!isset($minSeed) && isset($js_file['options']['seed'])) |
4114 | 4111 | $minSeed = $js_file['options']['seed']; |
4115 | 4112 | } |
4116 | - |
|
4117 | 4113 | else |
4118 | 4114 | { |
4119 | 4115 | echo ' |
@@ -6295,7 +6291,6 @@ discard block |
||
6295 | 6291 | $isWritable = true; |
6296 | 6292 | break; |
6297 | 6293 | } |
6298 | - |
|
6299 | 6294 | else |
6300 | 6295 | @chmod($file, $val); |
6301 | 6296 | } |
@@ -7227,7 +7222,6 @@ discard block |
||
7227 | 7222 | |
7228 | 7223 | $length += array_length($value, $deep_count); |
7229 | 7224 | } |
7230 | - |
|
7231 | 7225 | else |
7232 | 7226 | $length += strlen($value); |
7233 | 7227 | } |
@@ -500,7 +500,7 @@ discard block |
||
500 | 500 | log_error(sprintf($txt['smiley_set_dir_not_found'], $set_names[array_search($set, $context['smiley_sets'])])); |
501 | 501 | |
502 | 502 | $context['smiley_sets'] = array_filter($context['smiley_sets'], function($v) use ($set) |
503 | - { |
|
503 | + { |
|
504 | 504 | return $v != $set; |
505 | 505 | }); |
506 | 506 | } |
@@ -3467,7 +3467,6 @@ discard block |
||
3467 | 3467 | } |
3468 | 3468 | } |
3469 | 3469 | } |
3470 | - |
|
3471 | 3470 | elseif (($value == 'upload' && allowedTo('profile_upload_avatar')) || $downloadedExternalAvatar) |
3472 | 3471 | { |
3473 | 3472 | if ((isset($_FILES['attachment']['name']) && $_FILES['attachment']['name'] != '') || $downloadedExternalAvatar) |
@@ -869,7 +869,6 @@ |
||
869 | 869 | $can_approve_boards = boardsAllowedTo('approve_posts'); |
870 | 870 | $onlyApproved = $can_approve_boards !== array(0) && !in_array($_REQUEST['targetboard'], $can_approve_boards); |
871 | 871 | } |
872 | - |
|
873 | 872 | else |
874 | 873 | $onlyApproved = false; |
875 | 874 |
@@ -1197,7 +1197,8 @@ discard block |
||
1197 | 1197 | } |
1198 | 1198 | |
1199 | 1199 | // It's important to do the numbered ones before the named ones, or messes happen. |
1200 | - uksort($substitutions, function($a, $b) { |
|
1200 | + uksort($substitutions, function($a, $b) |
|
1201 | + { |
|
1201 | 1202 | if (is_int($a) && is_int($b)) |
1202 | 1203 | return $a > $b; |
1203 | 1204 | elseif (is_int($a)) |
@@ -1716,8 +1717,12 @@ discard block |
||
1716 | 1717 | unset($mtime, $settingsFile, $settingsText); |
1717 | 1718 | $defined_vars = get_defined_vars(); |
1718 | 1719 | } |
1719 | - catch (Throwable $e) {} |
|
1720 | - catch (ErrorException $e) {} |
|
1720 | + catch (Throwable $e) |
|
1721 | + { |
|
1722 | +} |
|
1723 | + catch (ErrorException $e) |
|
1724 | + { |
|
1725 | +} |
|
1721 | 1726 | if (isset($e)) |
1722 | 1727 | return false; |
1723 | 1728 | |
@@ -1877,7 +1882,8 @@ discard block |
||
1877 | 1882 | // For the same reason, replace literal returns and newlines with "\r" and "\n" |
1878 | 1883 | elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false)) |
1879 | 1884 | { |
1880 | - return strtr(preg_replace_callback('/[\r\n]+/', function($m) { |
|
1885 | + return strtr(preg_replace_callback('/[\r\n]+/', function($m) |
|
1886 | + { |
|
1881 | 1887 | return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \''; |
1882 | 1888 | }, $var), array("'' . " => '', " . ''" => '')); |
1883 | 1889 | } |