Passed
Push — release-2.1 ( 4017f8...859b2c )
by Mathias
08:28 queued 12s
created
Sources/Load.php 2 patches
Braces   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	// Set a list of common functions.
105 105
 	$ent_list = '&(?:#' . (empty($modSettings['disableEntityCheck']) ? '\d{1,7}' : '021') . '|quot|amp|lt|gt|nbsp);';
106 106
 	$ent_check = empty($modSettings['disableEntityCheck']) ? function($string)
107
-		{
107
+	{
108 108
 			$string = preg_replace_callback('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'entity_fix__callback', $string);
109 109
 			return $string;
110 110
 		} : function($string)
@@ -929,7 +929,6 @@  discard block
 block discarded – undo
929 929
 			$user_info_min[$row['id_member']]['time_offset'] = ($tz_user->getOffset($time_user) -
930 930
 					$tz_system->getOffset($time_system)) / 3600;
931 931
 		}
932
-
933 932
 		else
934 933
 			$user_info_min[$row['id_member']]['time_offset'] = empty($row['time_offset']) ? 0 : $row['time_offset'];
935 934
 	}
@@ -1657,7 +1656,6 @@  discard block
 block discarded – undo
1657 1656
 			$time_user = new DateTime('now', $tz_user);
1658 1657
 			$profile['time_offset'] = ($tz_user->getOffset($time_user) - $tz_system->getOffset($time_system)) / 3600;
1659 1658
 		}
1660
-
1661 1659
 		else
1662 1660
 		{
1663 1661
 			// !!! Compatibility.
@@ -2351,7 +2349,6 @@  discard block
 block discarded – undo
2351 2349
 		loadLanguage('index+Modifications');
2352 2350
 		$context['template_layers'] = array();
2353 2351
 	}
2354
-
2355 2352
 	else
2356 2353
 	{
2357 2354
 		// Custom templates to load, or just default?
Please login to merge, or discard this patch.
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2718,8 +2718,7 @@  discard block
 block discarded – undo
2718 2718
 		$context['css_files_order'] = array();
2719 2719
 
2720 2720
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2721
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2722
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2721
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2723 2722
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2724 2723
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2725 2724
 	$params['minimize'] = isset($params['minimize']) ? $params['minimize'] : true;
@@ -2833,8 +2832,7 @@  discard block
 block discarded – undo
2833 2832
 	global $settings, $context, $modSettings;
2834 2833
 
2835 2834
 	$params['seed'] = (!array_key_exists('seed', $params) || (array_key_exists('seed', $params) && $params['seed'] === true)) ?
2836
-		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') :
2837
-		(is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2835
+		(array_key_exists('browser_cache', $context) ? $context['browser_cache'] : '') : (is_string($params['seed']) ? '?' . ltrim($params['seed'], '?') : '');
2838 2836
 	$params['force_current'] = isset($params['force_current']) ? $params['force_current'] : false;
2839 2837
 	$themeRef = !empty($params['default_theme']) ? 'default_theme' : 'theme';
2840 2838
 	$params['async'] = isset($params['async']) ? $params['async'] : false;
@@ -3577,8 +3575,7 @@  discard block
 block discarded – undo
3577 3575
 
3578 3576
 	// What accelerator we are going to try.
3579 3577
 	$cache_class_name = !empty($cache_accelerator) ? $cache_accelerator : CacheApi::APIS_DEFAULT;
3580
-	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache :
3581
-		CacheApi::APIS_NAMESPACE . $cache_class_name;
3578
+	$fully_qualified_class_name = !empty($overrideCache) ? $overrideCache : CacheApi::APIS_NAMESPACE . $cache_class_name;
3582 3579
 
3583 3580
 	// Do some basic tests.
3584 3581
 	if (class_exists($fully_qualified_class_name))
Please login to merge, or discard this patch.
Sources/Subs-Timezones.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 		output will be 'Mountain Time (MST/MDT)' for America/Denver vs.
51 51
 		'Mountain Standard Time (MST)' for America/Phoenix.
52 52
 	 */
53
-	$tzid_metazones =  array(
53
+	$tzid_metazones = array(
54 54
 		// Africa_Central (no DST)
55 55
 		'Africa/Maputo' => 'Africa_Central',
56 56
 
Please login to merge, or discard this patch.
Sources/Subs.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 			{
378 378
 				$val = 'CASE ';
379 379
 				foreach ($members as $k => $v)
380
-					$val .= 'WHEN id_member = ' . $v . ' THEN '. alert_count($v, true) . ' ';
380
+					$val .= 'WHEN id_member = ' . $v . ' THEN ' . alert_count($v, true) . ' ';
381 381
 
382 382
 				$val = $val . ' END';
383 383
 				$type = 'raw';
@@ -1039,11 +1039,11 @@  discard block
 block discarded – undo
1039 1039
 			// Anything that isn't a specification, punctuation mark, or whitespace.
1040 1040
 			'~(?<!%)\p{L}|[^\p{L}\p{P}\s]~u',
1041 1041
 			// A series of punctuation marks (except %), possibly separated by whitespace.
1042
-			'~([^%\P{P}])(\s*)(?'.'>(\1|[^%\P{Po}])\s*(?!$))*~u',
1042
+			'~([^%\P{P}])(\s*)(?' . '>(\1|[^%\P{Po}])\s*(?!$))*~u',
1043 1043
 			// Unwanted trailing punctuation and whitespace.
1044
-			'~(?'.'>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1044
+			'~(?' . '>([\p{Pd}\p{Ps}\p{Pi}\p{Pc}]|[^%\P{Po}])\s*)*$~u',
1045 1045
 			// Unwanted opening punctuation and whitespace.
1046
-			'~^\s*(?'.'>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1046
+			'~^\s*(?' . '>([\p{Pd}\p{Pe}\p{Pf}\p{Pc}]|[^%\P{Po}])\s*)*~u',
1047 1047
 		),
1048 1048
 		array(
1049 1049
 			'',
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
 							$width = !empty($width) ? ' width="' . $width . '"' : '';
1463 1463
 							$height = !empty($height) ? ' height="' . $height . '"' : '';
1464 1464
 
1465
-							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="'. $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1465
+							$returnContext .= '<div class="videocontainer"><video controls preload="metadata" src="' . $currentAttachment['href'] . '" playsinline' . $width . $height . '><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></video></div>' . (!empty($data) && $data != $currentAttachment['name'] ? '<div class="smalltext">' . $data . '</div>' : '');
1466 1466
 						}
1467 1467
 						// Audio.
1468 1468
 						elseif (strpos($currentAttachment['mime_type'], 'audio/') === 0)
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
 							$width = 'max-width:100%; width: ' . (!empty($width) ? $width : '400') . 'px;';
1471 1471
 							$height = !empty($height) ? 'height: ' . $height . 'px;' : '';
1472 1472
 
1473
-							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="'. $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1473
+							$returnContext .= (!empty($data) && $data != $currentAttachment['name'] ? $data . ' ' : '') . '<audio controls preload="none" src="' . $currentAttachment['href'] . '" class="bbc_audio" style="vertical-align:middle;' . $width . $height . '"><a href="' . $currentAttachment['href'] . '" class="bbc_link">' . $smcFunc['htmlspecialchars'](!empty($data) ? $data : $currentAttachment['name']) . '</a></audio>';
1474 1474
 						}
1475 1475
 						// Anything else.
1476 1476
 						else
@@ -1639,7 +1639,7 @@  discard block
 block discarded – undo
1639 1639
 				'type' => 'unparsed_commas_content',
1640 1640
 				'test' => '\d+,\d+\]',
1641 1641
 				'content' => '<a href="$1" target="_blank" rel="noopener">$1</a>',
1642
-				'validate' => function (&$tag, &$data, $disabled)
1642
+				'validate' => function(&$tag, &$data, $disabled)
1643 1643
 				{
1644 1644
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1645 1645
 					if (empty($scheme))
@@ -2177,12 +2177,12 @@  discard block
 block discarded – undo
2177 2177
 		$codes[] = array(
2178 2178
 			'tag' => 'cowsay',
2179 2179
 			'parameters' => array(
2180
-				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2180
+				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function($eyes) use ($smcFunc)
2181 2181
 					{
2182 2182
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2183 2183
 					},
2184 2184
 				),
2185
-				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2185
+				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function($tongue) use ($smcFunc)
2186 2186
 					{
2187 2187
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2188 2188
 					},
@@ -3563,7 +3563,7 @@  discard block
 block discarded – undo
3563 3563
 		if ($fp != false)
3564 3564
 		{
3565 3565
 			// Send the HEAD request (since we don't have to worry about chunked, HTTP/1.1 is fine here.)
3566
-			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: '. SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
3566
+			fwrite($fp, 'HEAD /' . $match[2] . ' HTTP/1.1' . "\r\n" . 'Host: ' . $match[1] . "\r\n" . 'user-agent: ' . SMF_USER_AGENT . "\r\n" . 'Connection: close' . "\r\n\r\n");
3567 3567
 
3568 3568
 			// Read in the HTTP/1.1 or whatever.
3569 3569
 			$test = substr(fgets($fp, 11), -1);
@@ -4164,7 +4164,7 @@  discard block
 block discarded – undo
4164 4164
 	$toMinify = array();
4165 4165
 	$normal = array();
4166 4166
 
4167
-	uasort($context['css_files'], function ($a, $b)
4167
+	uasort($context['css_files'], function($a, $b)
4168 4168
 	{
4169 4169
 		return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0);
4170 4170
 	});
@@ -5461,7 +5461,7 @@  discard block
 block discarded – undo
5461 5461
 			{
5462 5462
 				fwrite($fp, 'GET ' . ($match[6] !== '/' ? str_replace(' ', '%20', $match[6]) : '') . ' HTTP/1.0' . "\r\n");
5463 5463
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5464
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5464
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5465 5465
 				if ($keep_alive)
5466 5466
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n\r\n");
5467 5467
 				else
@@ -5471,7 +5471,7 @@  discard block
 block discarded – undo
5471 5471
 			{
5472 5472
 				fwrite($fp, 'POST ' . ($match[6] !== '/' ? $match[6] : '') . ' HTTP/1.0' . "\r\n");
5473 5473
 				fwrite($fp, 'Host: ' . $match[3] . (empty($match[5]) ? ($match[2] ? ':443' : '') : ':' . $match[5]) . "\r\n");
5474
-				fwrite($fp, 'user-agent: '. SMF_USER_AGENT . "\r\n");
5474
+				fwrite($fp, 'user-agent: ' . SMF_USER_AGENT . "\r\n");
5475 5475
 				if ($keep_alive)
5476 5476
 					fwrite($fp, 'connection: Keep-Alive' . "\r\n");
5477 5477
 				else
@@ -5719,13 +5719,13 @@  discard block
 block discarded – undo
5719 5719
 
5720 5720
 	// UTF-8 occurences of MS special characters
5721 5721
 	$findchars_utf8 = array(
5722
-		"\xe2\x80\x9a",	// single low-9 quotation mark
5723
-		"\xe2\x80\x9e",	// double low-9 quotation mark
5724
-		"\xe2\x80\xa6",	// horizontal ellipsis
5725
-		"\xe2\x80\x98",	// left single curly quote
5726
-		"\xe2\x80\x99",	// right single curly quote
5727
-		"\xe2\x80\x9c",	// left double curly quote
5728
-		"\xe2\x80\x9d",	// right double curly quote
5722
+		"\xe2\x80\x9a", // single low-9 quotation mark
5723
+		"\xe2\x80\x9e", // double low-9 quotation mark
5724
+		"\xe2\x80\xa6", // horizontal ellipsis
5725
+		"\xe2\x80\x98", // left single curly quote
5726
+		"\xe2\x80\x99", // right single curly quote
5727
+		"\xe2\x80\x9c", // left double curly quote
5728
+		"\xe2\x80\x9d", // right double curly quote
5729 5729
 	);
5730 5730
 
5731 5731
 	// windows 1252 / iso equivalents
@@ -5741,13 +5741,13 @@  discard block
 block discarded – undo
5741 5741
 
5742 5742
 	// safe replacements
5743 5743
 	$replacechars = array(
5744
-		',',	// &sbquo;
5745
-		',,',	// &bdquo;
5746
-		'...',	// &hellip;
5747
-		"'",	// &lsquo;
5748
-		"'",	// &rsquo;
5749
-		'"',	// &ldquo;
5750
-		'"',	// &rdquo;
5744
+		',', // &sbquo;
5745
+		',,', // &bdquo;
5746
+		'...', // &hellip;
5747
+		"'", // &lsquo;
5748
+		"'", // &rsquo;
5749
+		'"', // &ldquo;
5750
+		'"', // &rdquo;
5751 5751
 	);
5752 5752
 
5753 5753
 	if ($context['utf8'])
@@ -6090,7 +6090,7 @@  discard block
 block discarded – undo
6090 6090
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6091 6091
 
6092 6092
 		// We don't want abbreviations like '+03' or '-11'.
6093
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6093
+		$abbrs = array_filter($tzvalue['abbrs'], function($abbr) {
6094 6094
 			return !strspn($abbr, '+-');
6095 6095
 		});
6096 6096
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -7054,7 +7054,7 @@  discard block
 block discarded – undo
7054 7054
 			EXISTS (
7055 7055
 				SELECT bpv.id_board
7056 7056
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7057
-				WHERE bpv.id_group IN ('. implode(',', $groups) .')
7057
+				WHERE bpv.id_group IN ('. implode(',', $groups) . ')
7058 7058
 					AND bpv.deny = 0
7059 7059
 					AND bpv.id_board = b.id_board
7060 7060
 			)';
@@ -7064,7 +7064,7 @@  discard block
 block discarded – undo
7064 7064
 			AND NOT EXISTS (
7065 7065
 				SELECT bpv.id_board
7066 7066
 				FROM ' . $db_prefix . 'board_permissions_view AS bpv
7067
-				WHERE bpv.id_group IN ( '. implode(',', $groups) .')
7067
+				WHERE bpv.id_group IN ( '. implode(',', $groups) . ')
7068 7068
 					AND bpv.deny = 1
7069 7069
 					AND bpv.id_board = b.id_board
7070 7070
 			)';
@@ -7335,8 +7335,8 @@  discard block
 block discarded – undo
7335 7335
 	$i = 0;
7336 7336
 	while (empty($done))
7337 7337
 	{
7338
-		if (strpos($format, '{'. --$i . '}') !== false)
7339
-			$replacements['{'. $i . '}'] = array_pop($list);
7338
+		if (strpos($format, '{' . --$i . '}') !== false)
7339
+			$replacements['{' . $i . '}'] = array_pop($list);
7340 7340
 		else
7341 7341
 			$done = true;
7342 7342
 	}
@@ -7346,8 +7346,8 @@  discard block
 block discarded – undo
7346 7346
 	$i = 0;
7347 7347
 	while (empty($done))
7348 7348
 	{
7349
-		if (strpos($format, '{'. ++$i . '}') !== false)
7350
-			$replacements['{'. $i . '}'] = array_shift($list);
7349
+		if (strpos($format, '{' . ++$i . '}') !== false)
7350
+			$replacements['{' . $i . '}'] = array_shift($list);
7351 7351
 		else
7352 7352
 			$done = true;
7353 7353
 	}
Please login to merge, or discard this patch.
Braces   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -279,7 +279,6 @@  discard block
 block discarded – undo
279 279
 		$condition = 'id_member IN ({array_int:members})';
280 280
 		$parameters['members'] = $members;
281 281
 	}
282
-
283 282
 	elseif ($members === null)
284 283
 		$condition = '1=1';
285 284
 
@@ -382,11 +381,9 @@  discard block
 block discarded – undo
382 381
 				$val = $val . ' END';
383 382
 				$type = 'raw';
384 383
 			}
385
-
386 384
 			else
387 385
 				$val = alert_count($members, true);
388 386
 		}
389
-
390 387
 		elseif ($type == 'int' && ($val === '+' || $val === '-'))
391 388
 		{
392 389
 			$val = $var . ' ' . $val . ' 1';
@@ -2178,12 +2175,12 @@  discard block
 block discarded – undo
2178 2175
 			'tag' => 'cowsay',
2179 2176
 			'parameters' => array(
2180 2177
 				'e' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => 'oo', 'validate' => function ($eyes) use ($smcFunc)
2181
-					{
2178
+				{
2182 2179
 						return $smcFunc['substr']($eyes . 'oo', 0, 2);
2183 2180
 					},
2184 2181
 				),
2185 2182
 				't' => array('optional' => true, 'quoted' => true, 'match' => '(.*?)', 'default' => '  ', 'validate' => function ($tongue) use ($smcFunc)
2186
-					{
2183
+				{
2187 2184
 						return $smcFunc['substr']($tongue . '  ', 0, 2);
2188 2185
 					},
2189 2186
 				),
@@ -3290,7 +3287,7 @@  discard block
 block discarded – undo
3290 3287
 
3291 3288
 	// Replace away!
3292 3289
 	$message = preg_replace_callback($smileyPregSearch, function($matches) use ($smileyPregReplacements)
3293
-		{
3290
+	{
3294 3291
 			return $smileyPregReplacements[$matches[1]];
3295 3292
 		}, $message);
3296 3293
 }
@@ -4085,7 +4082,6 @@  discard block
 block discarded – undo
4085 4082
 				if (!isset($minSeed) && isset($js_file['options']['seed']))
4086 4083
 					$minSeed = $js_file['options']['seed'];
4087 4084
 			}
4088
-
4089 4085
 			else
4090 4086
 			{
4091 4087
 				echo '
@@ -6005,7 +6001,8 @@  discard block
 block discarded – undo
6005 6001
 			$zones[$tzkey]['tzid'] = $tzid;
6006 6002
 			$zones[$tzkey]['dst_type'] = count($tzinfo) > 1 ? 1 : ($tzinfo[0]['isdst'] ? 2 : 0);
6007 6003
 
6008
-			foreach ($tzinfo as $transition) {
6004
+			foreach ($tzinfo as $transition)
6005
+			{
6009 6006
 				$zones[$tzkey]['abbrs'][] = $transition['abbr'];
6010 6007
 			}
6011 6008
 
@@ -6090,7 +6087,8 @@  discard block
 block discarded – undo
6090 6087
 			$desc = implode(', ', array_slice(array_unique($tzvalue['locations']), 0, 5)) . (count($tzvalue['locations']) > 5 ? ', ' . $txt['etc'] : '');
6091 6088
 
6092 6089
 		// We don't want abbreviations like '+03' or '-11'.
6093
-		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr) {
6090
+		$abbrs = array_filter($tzvalue['abbrs'], function ($abbr)
6091
+		{
6094 6092
 			return !strspn($abbr, '+-');
6095 6093
 		});
6096 6094
 		$abbrs = count($abbrs) == count($tzvalue['abbrs']) ? array_unique($abbrs) : array();
@@ -6491,7 +6489,6 @@  discard block
 block discarded – undo
6491 6489
 			$isWritable = true;
6492 6490
 			break;
6493 6491
 		}
6494
-
6495 6492
 		else
6496 6493
 			@chmod($file, $val);
6497 6494
 	}
Please login to merge, or discard this patch.
Sources/Subs-Admin.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1229,7 +1229,8 @@  discard block
 block discarded – undo
1229 1229
 	}
1230 1230
 
1231 1231
 	// It's important to do the numbered ones before the named ones, or messes happen.
1232
-	uksort($substitutions, function($a, $b) {
1232
+	uksort($substitutions, function($a, $b)
1233
+	{
1233 1234
 		if (is_int($a) && is_int($b))
1234 1235
 			return $a > $b ? 1 : ($a < $b ? -1 : 0);
1235 1236
 		elseif (is_int($a))
@@ -1768,8 +1769,12 @@  discard block
 block discarded – undo
1768 1769
 		unset($mtime, $settingsFile, $settingsText);
1769 1770
 		$defined_vars = get_defined_vars();
1770 1771
 	}
1771
-	catch (Throwable $e) {}
1772
-	catch (ErrorException $e) {}
1772
+	catch (Throwable $e)
1773
+	{
1774
+}
1775
+	catch (ErrorException $e)
1776
+	{
1777
+}
1773 1778
 	if (isset($e))
1774 1779
 		return false;
1775 1780
 
@@ -1925,7 +1930,8 @@  discard block
 block discarded – undo
1925 1930
 	// For the same reason, replace literal returns and newlines with "\r" and "\n"
1926 1931
 	elseif (is_string($var) && (strpos($var, "\n") !== false || strpos($var, "\r") !== false))
1927 1932
 	{
1928
-		return strtr(preg_replace_callback('/[\r\n]+/', function($m) {
1933
+		return strtr(preg_replace_callback('/[\r\n]+/', function($m)
1934
+		{
1929 1935
 			return '\' . "' . strtr($m[0], array("\r" => '\r', "\n" => '\n')) . '" . \'';
1930 1936
 		}, $var), array("'' . " => '', " . ''" => ''));
1931 1937
 	}
Please login to merge, or discard this patch.