Passed
Pull Request — release-2.1 (#5972)
by 01
03:53
created
Sources/Class-Package.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -881,7 +881,6 @@  discard block
 block discarded – undo
881 881
 				$is_writable = true;
882 882
 				break;
883 883
 			}
884
-
885 884
 			else
886 885
 			{
887 886
 				// Convert the chmod value from octal (0777) to text ("777").
@@ -935,8 +934,9 @@  discard block
 block discarded – undo
935 934
 	{
936 935
 		// Wait for a response that isn't continued with -, but don't wait too long.
937 936
 		$time = time();
938
-		do
939
-			$this->last_message = fgets($this->connection, 1024);
937
+		do {
938
+					$this->last_message = fgets($this->connection, 1024);
939
+		}
940 940
 		while ((strlen($this->last_message) < 4 || strpos($this->last_message, ' ') === 0 || strpos($this->last_message, ' ', 3) !== 3) && time() - $time < 5);
941 941
 
942 942
 		// Was the desired response returned?
@@ -957,8 +957,9 @@  discard block
 block discarded – undo
957 957
 		// Request a passive connection - this means, we'll talk to you, you don't talk to us.
958 958
 		@fwrite($this->connection, 'PASV' . "\r\n");
959 959
 		$time = time();
960
-		do
961
-			$response = fgets($this->connection, 1024);
960
+		do {
961
+					$response = fgets($this->connection, 1024);
962
+		}
962 963
 		while (strpos($response, ' ', 3) !== 3 && time() - $time < 5);
963 964
 
964 965
 		// If it's not 227, we weren't given an IP and port, which means it failed.
@@ -1080,8 +1081,9 @@  discard block
 block discarded – undo
1080 1081
 
1081 1082
 		@fwrite($this->connection, 'PWD' . "\r\n");
1082 1083
 		$time = time();
1083
-		do
1084
-			$response = fgets($this->connection, 1024);
1084
+		do {
1085
+					$response = fgets($this->connection, 1024);
1086
+		}
1085 1087
 		while ($response[3] != ' ' && time() - $time < 5);
1086 1088
 
1087 1089
 		// Check for 257!
Please login to merge, or discard this patch.
Sources/Subs-Db-postgresql.php 3 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -722,12 +722,12 @@
 block discarded – undo
722 722
 		$where = '';
723 723
 		$count_pk = 0;
724 724
 
725
-		If ($replace_support)
725
+		if ($replace_support)
726 726
 		{
727 727
 			foreach ($columns as $columnName => $type)
728 728
 			{
729 729
 				//check pk fiel
730
-				IF (in_array($columnName, $keys))
730
+				if (in_array($columnName, $keys))
731 731
 				{
732 732
 					$key_str .= ($count_pk > 0 ? ',' : '');
733 733
 					$key_str .= $columnName;
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -979,7 +979,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		display_db_error();
74 74
 
75 75
 	// We need to escape ' and \
76
-	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
76
+	$db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd);
77 77
 
78 78
 	if (!empty($db_options['persist']))
79 79
 		$connection = @pg_pconnect((empty($db_server) ? '' : 'host=' . $db_server . ' ') . 'dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\''));
@@ -925,7 +925,7 @@  discard block
 block discarded – undo
925 925
 	if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false)
926 926
 		$error_array[2] = null;
927 927
 
928
-	if(empty($db_persist))
928
+	if (empty($db_persist))
929 929
 	{ // without pooling
930 930
 		if (empty($pg_error_data_prep))
931 931
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
Please login to merge, or discard this patch.
Sources/Recent.php 2 patches
Braces   -1 removed lines patch added patch discarded remove patch
@@ -1252,7 +1252,6 @@
 block discarded – undo
1252 1252
 			if (!empty($modSettings['enableAllMessages']) && $topic_length < $modSettings['enableAllMessages'])
1253 1253
 				$pages .= ' &nbsp;<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0;all">' . $txt['all'] . '</a>';
1254 1254
 		}
1255
-
1256 1255
 		else
1257 1256
 			$pages = '';
1258 1257
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -463,20 +463,20 @@
 block discarded – undo
463 463
 		$context['posts'][$key]['quickbuttons'] = array(
464 464
 			'reply' => array(
465 465
 				'label' => $txt['reply'],
466
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'],
466
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'],
467 467
 				'icon' => 'reply_button',
468 468
 				'show' => $post['can_reply']
469 469
 			),
470 470
 			'quote' => array(
471 471
 				'label' => $txt['quote_action'],
472
-				'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'],
472
+				'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'],
473 473
 				'icon' => 'quote',
474 474
 				'show' => $post['can_quote']
475 475
 			),
476 476
 			'delete' => array(
477 477
 				'label' => $txt['remove'],
478
-				'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'],
479
-				'javascript' => 'data-confirm="'.$txt['remove_message'].'" class="you_sure"',
478
+				'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'],
479
+				'javascript' => 'data-confirm="' . $txt['remove_message'] . '" class="you_sure"',
480 480
 				'icon' => 'remove_button',
481 481
 				'show' => $post['can_delete']
482 482
 			),
Please login to merge, or discard this patch.
Sources/ManageMaintenance.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -2291,7 +2291,6 @@
 block discarded – undo
2291 2291
 		list ($hookData['class'], $hookData['method']) = explode('::', $modFunc);
2292 2292
 		$hookData['pureFunc'] = $hookData['method'];
2293 2293
 	}
2294
-
2295 2294
 	else
2296 2295
 		$hookData['pureFunc'] = $modFunc;
2297 2296
 
Please login to merge, or discard this patch.
Sources/PersonalMessage.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
 		// Deleting an existing label?
3220 3220
 		elseif (isset($_POST['delete'], $_POST['delete_label']))
3221 3221
 		{
3222
-			foreach ($_POST['delete_label'] AS $label => $dummy)
3222
+			foreach ($_POST['delete_label'] as $label => $dummy)
3223 3223
 			{
3224 3224
 				unset($the_labels[$label]);
3225 3225
 				$labels_to_remove[] = $label;
@@ -3260,7 +3260,7 @@  discard block
 block discarded – undo
3260 3260
 		if (!empty($labels_to_add))
3261 3261
 		{
3262 3262
 			$inserts = array();
3263
-			foreach ($labels_to_add AS $label)
3263
+			foreach ($labels_to_add as $label)
3264 3264
 				$inserts[] = array($user_info['id'], $label);
3265 3265
 
3266 3266
 			$smcFunc['db_insert']('', '{db_prefix}pm_labels', array('id_member' => 'int', 'name' => 'string-30'), $inserts, array());
@@ -3269,7 +3269,7 @@  discard block
 block discarded – undo
3269 3269
 		// Update existing labels as needed
3270 3270
 		if (!empty($label_upates))
3271 3271
 		{
3272
-			foreach ($label_updates AS $id => $name)
3272
+			foreach ($label_updates as $id => $name)
3273 3273
 			{
3274 3274
 				$smcFunc['db_query']('', '
3275 3275
 					UPDATE {db_prefix}labels
Please login to merge, or discard this patch.
Sources/Register.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -849,7 +849,6 @@
 block discarded – undo
849 849
 			die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
850 850
 		}
851 851
 	}
852
-
853 852
 	elseif ($_REQUEST['format'] === '.wav')
854 853
 	{
855 854
 		require_once($sourcedir . '/Subs-Sound.php');
Please login to merge, or discard this patch.
Sources/Subs-Membergroups.php 1 patch
Braces   -1 removed lines patch added patch discarded remove patch
@@ -756,7 +756,6 @@
 block discarded – undo
756 756
 				$groups[$row['id_group']]['num_members'] += $row['num_members'];
757 757
 			$smcFunc['db_free_result']($query);
758 758
 		}
759
-
760 759
 		else
761 760
 		{
762 761
 			$query = $smcFunc['db_query']('', '
Please login to merge, or discard this patch.
Themes/default/Calendar.template.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -425,7 +425,8 @@  discard block
 block discarded – undo
425 425
 					if (!empty($day['events']))
426 426
 					{
427 427
 						// Sort events by start time (all day events will be listed first)
428
-						uasort($day['events'], function($a, $b) {
428
+						uasort($day['events'], function($a, $b)
429
+						{
429 430
 							if ($a['start_timestamp'] == $b['start_timestamp'])
430 431
 								return 0;
431 432
 
@@ -619,7 +620,8 @@  discard block
 block discarded – undo
619 620
 			if (!empty($day['events']))
620 621
 			{
621 622
 				// Sort events by start time (all day events will be listed first)
622
-				uasort($day['events'], function($a, $b) {
623
+				uasort($day['events'], function($a, $b)
624
+				{
623 625
 					if ($a['start_timestamp'] == $b['start_timestamp'])
624 626
 						return 0;
625 627
 					return ($a['start_timestamp'] < $b['start_timestamp']) ? -1 : 1;
Please login to merge, or discard this patch.
other/upgrade.php 3 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3388,7 +3388,7 @@  discard block
 block discarded – undo
3388 3388
 
3389 3389
 	$regex = <<<'EOT'
3390 3390
 (\s*#\s*Make\s+sure\s+the\s+paths\s+are\s+correct\.\.\.\s+at\s+least\s+try\s+to\s+fix\s+them\.\s+)?if\s*\(\!file_exists\(\$boarddir\)\s+&&\s+file_exists\(dirname\(__FILE__\)\s+\.\s+'/agreement\.txt'\)\)\s+\$boarddir\s*\=\s*dirname\(__FILE__\);\s+if\s*\(\!file_exists\(\$sourcedir\)\s+&&\s+file_exists\(\$boarddir\s*\.\s*'/Sources'\)\)\s+\$sourcedir\s*\=\s*\$boarddir\s*\.\s*'/Sources';\s+if\s*\(\!file_exists\(\$cachedir\)\s+&&\s+file_exists\(\$boarddir\s*\.\s*'/cache'\)\)\s+\$cachedir\s*\=\s*\$boarddir\s*\.\s*'/cache';
3391
-EOT;
3391
+eot;
3392 3392
 
3393 3393
 	$replacement = <<<'EOT'
3394 3394
 # Make sure the paths are correct... at least try to fix them.
@@ -3400,7 +3400,7 @@  discard block
 block discarded – undo
3400 3400
 	$cachedir = $boarddir . '/cache';
3401 3401
 
3402 3402
 
3403
-EOT;
3403
+eot;
3404 3404
 
3405 3405
 	if (preg_match('~' . $regex . '~', $settings) && preg_match('~(#+\s*Error-Catching\s*#+)~', $settings))
3406 3406
 	{
Please login to merge, or discard this patch.
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 		$to = explode('/', $lang_dir);
502 502
 		$relPath = $to;
503 503
 
504
-		foreach($from as $depth => $dir)
504
+		foreach ($from as $depth => $dir)
505 505
 		{
506 506
 			if ($dir === $to[$depth])
507 507
 				array_shift($relPath);
@@ -2881,94 +2881,94 @@  discard block
 block discarded – undo
2881 2881
 		// Translation table for the character sets not native for MySQL.
2882 2882
 		$translation_tables = array(
2883 2883
 			'windows-1255' => array(
2884
-				'0x81' => '\'\'',		'0x8A' => '\'\'',		'0x8C' => '\'\'',
2885
-				'0x8D' => '\'\'',		'0x8E' => '\'\'',		'0x8F' => '\'\'',
2886
-				'0x90' => '\'\'',		'0x9A' => '\'\'',		'0x9C' => '\'\'',
2887
-				'0x9D' => '\'\'',		'0x9E' => '\'\'',		'0x9F' => '\'\'',
2888
-				'0xCA' => '\'\'',		'0xD9' => '\'\'',		'0xDA' => '\'\'',
2889
-				'0xDB' => '\'\'',		'0xDC' => '\'\'',		'0xDD' => '\'\'',
2890
-				'0xDE' => '\'\'',		'0xDF' => '\'\'',		'0xFB' => '0xD792',
2891
-				'0xFC' => '0xE282AC',		'0xFF' => '0xD6B2',		'0xC2' => '0xFF',
2892
-				'0x80' => '0xFC',		'0xE2' => '0xFB',		'0xA0' => '0xC2A0',
2893
-				'0xA1' => '0xC2A1',		'0xA2' => '0xC2A2',		'0xA3' => '0xC2A3',
2894
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2895
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2896
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2897
-				'0xAF' => '0xC2AF',		'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',
2898
-				'0xB2' => '0xC2B2',		'0xB3' => '0xC2B3',		'0xB4' => '0xC2B4',
2899
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2900
-				'0xB8' => '0xC2B8',		'0xB9' => '0xC2B9',		'0xBB' => '0xC2BB',
2901
-				'0xBC' => '0xC2BC',		'0xBD' => '0xC2BD',		'0xBE' => '0xC2BE',
2902
-				'0xBF' => '0xC2BF',		'0xD7' => '0xD7B3',		'0xD1' => '0xD781',
2903
-				'0xD4' => '0xD7B0',		'0xD5' => '0xD7B1',		'0xD6' => '0xD7B2',
2904
-				'0xE0' => '0xD790',		'0xEA' => '0xD79A',		'0xEC' => '0xD79C',
2905
-				'0xED' => '0xD79D',		'0xEE' => '0xD79E',		'0xEF' => '0xD79F',
2906
-				'0xF0' => '0xD7A0',		'0xF1' => '0xD7A1',		'0xF2' => '0xD7A2',
2907
-				'0xF3' => '0xD7A3',		'0xF5' => '0xD7A5',		'0xF6' => '0xD7A6',
2908
-				'0xF7' => '0xD7A7',		'0xF8' => '0xD7A8',		'0xF9' => '0xD7A9',
2909
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2910
-				'0x86' => '0xE280A0',	'0x87' => '0xE280A1',	'0x89' => '0xE280B0',
2911
-				'0x8B' => '0xE280B9',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2912
-				'0x95' => '0xE280A2',	'0x97' => '0xE28094',	'0x99' => '0xE284A2',
2913
-				'0xC0' => '0xD6B0',		'0xC1' => '0xD6B1',		'0xC3' => '0xD6B3',
2914
-				'0xC4' => '0xD6B4',		'0xC5' => '0xD6B5',		'0xC6' => '0xD6B6',
2915
-				'0xC7' => '0xD6B7',		'0xC8' => '0xD6B8',		'0xC9' => '0xD6B9',
2916
-				'0xCB' => '0xD6BB',		'0xCC' => '0xD6BC',		'0xCD' => '0xD6BD',
2917
-				'0xCE' => '0xD6BE',		'0xCF' => '0xD6BF',		'0xD0' => '0xD780',
2918
-				'0xD2' => '0xD782',		'0xE3' => '0xD793',		'0xE4' => '0xD794',
2919
-				'0xE5' => '0xD795',		'0xE7' => '0xD797',		'0xE9' => '0xD799',
2920
-				'0xFD' => '0xE2808E',	'0xFE' => '0xE2808F',	'0x92' => '0xE28099',
2921
-				'0x83' => '0xC692',		'0xD3' => '0xD783',		'0x88' => '0xCB86',
2922
-				'0x98' => '0xCB9C',		'0x91' => '0xE28098',	'0x96' => '0xE28093',
2923
-				'0xBA' => '0xC3B7',		'0x9B' => '0xE280BA',	'0xAA' => '0xC397',
2924
-				'0xA4' => '0xE282AA',	'0xE1' => '0xD791',		'0xE6' => '0xD796',
2925
-				'0xE8' => '0xD798',		'0xEB' => '0xD79B',		'0xF4' => '0xD7A4',
2884
+				'0x81' => '\'\'', '0x8A' => '\'\'', '0x8C' => '\'\'',
2885
+				'0x8D' => '\'\'', '0x8E' => '\'\'', '0x8F' => '\'\'',
2886
+				'0x90' => '\'\'', '0x9A' => '\'\'', '0x9C' => '\'\'',
2887
+				'0x9D' => '\'\'', '0x9E' => '\'\'', '0x9F' => '\'\'',
2888
+				'0xCA' => '\'\'', '0xD9' => '\'\'', '0xDA' => '\'\'',
2889
+				'0xDB' => '\'\'', '0xDC' => '\'\'', '0xDD' => '\'\'',
2890
+				'0xDE' => '\'\'', '0xDF' => '\'\'', '0xFB' => '0xD792',
2891
+				'0xFC' => '0xE282AC', '0xFF' => '0xD6B2', '0xC2' => '0xFF',
2892
+				'0x80' => '0xFC', '0xE2' => '0xFB', '0xA0' => '0xC2A0',
2893
+				'0xA1' => '0xC2A1', '0xA2' => '0xC2A2', '0xA3' => '0xC2A3',
2894
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2895
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2896
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2897
+				'0xAF' => '0xC2AF', '0xB0' => '0xC2B0', '0xB1' => '0xC2B1',
2898
+				'0xB2' => '0xC2B2', '0xB3' => '0xC2B3', '0xB4' => '0xC2B4',
2899
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2900
+				'0xB8' => '0xC2B8', '0xB9' => '0xC2B9', '0xBB' => '0xC2BB',
2901
+				'0xBC' => '0xC2BC', '0xBD' => '0xC2BD', '0xBE' => '0xC2BE',
2902
+				'0xBF' => '0xC2BF', '0xD7' => '0xD7B3', '0xD1' => '0xD781',
2903
+				'0xD4' => '0xD7B0', '0xD5' => '0xD7B1', '0xD6' => '0xD7B2',
2904
+				'0xE0' => '0xD790', '0xEA' => '0xD79A', '0xEC' => '0xD79C',
2905
+				'0xED' => '0xD79D', '0xEE' => '0xD79E', '0xEF' => '0xD79F',
2906
+				'0xF0' => '0xD7A0', '0xF1' => '0xD7A1', '0xF2' => '0xD7A2',
2907
+				'0xF3' => '0xD7A3', '0xF5' => '0xD7A5', '0xF6' => '0xD7A6',
2908
+				'0xF7' => '0xD7A7', '0xF8' => '0xD7A8', '0xF9' => '0xD7A9',
2909
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2910
+				'0x86' => '0xE280A0', '0x87' => '0xE280A1', '0x89' => '0xE280B0',
2911
+				'0x8B' => '0xE280B9', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2912
+				'0x95' => '0xE280A2', '0x97' => '0xE28094', '0x99' => '0xE284A2',
2913
+				'0xC0' => '0xD6B0', '0xC1' => '0xD6B1', '0xC3' => '0xD6B3',
2914
+				'0xC4' => '0xD6B4', '0xC5' => '0xD6B5', '0xC6' => '0xD6B6',
2915
+				'0xC7' => '0xD6B7', '0xC8' => '0xD6B8', '0xC9' => '0xD6B9',
2916
+				'0xCB' => '0xD6BB', '0xCC' => '0xD6BC', '0xCD' => '0xD6BD',
2917
+				'0xCE' => '0xD6BE', '0xCF' => '0xD6BF', '0xD0' => '0xD780',
2918
+				'0xD2' => '0xD782', '0xE3' => '0xD793', '0xE4' => '0xD794',
2919
+				'0xE5' => '0xD795', '0xE7' => '0xD797', '0xE9' => '0xD799',
2920
+				'0xFD' => '0xE2808E', '0xFE' => '0xE2808F', '0x92' => '0xE28099',
2921
+				'0x83' => '0xC692', '0xD3' => '0xD783', '0x88' => '0xCB86',
2922
+				'0x98' => '0xCB9C', '0x91' => '0xE28098', '0x96' => '0xE28093',
2923
+				'0xBA' => '0xC3B7', '0x9B' => '0xE280BA', '0xAA' => '0xC397',
2924
+				'0xA4' => '0xE282AA', '0xE1' => '0xD791', '0xE6' => '0xD796',
2925
+				'0xE8' => '0xD798', '0xEB' => '0xD79B', '0xF4' => '0xD7A4',
2926 2926
 				'0xFA' => '0xD7AA',
2927 2927
 			),
2928 2928
 			'windows-1253' => array(
2929
-				'0x81' => '\'\'',			'0x88' => '\'\'',			'0x8A' => '\'\'',
2930
-				'0x8C' => '\'\'',			'0x8D' => '\'\'',			'0x8E' => '\'\'',
2931
-				'0x8F' => '\'\'',			'0x90' => '\'\'',			'0x98' => '\'\'',
2932
-				'0x9A' => '\'\'',			'0x9C' => '\'\'',			'0x9D' => '\'\'',
2933
-				'0x9E' => '\'\'',			'0x9F' => '\'\'',			'0xAA' => '\'\'',
2934
-				'0xD2' => '0xE282AC',			'0xFF' => '0xCE92',			'0xCE' => '0xCE9E',
2935
-				'0xB8' => '0xCE88',		'0xBA' => '0xCE8A',		'0xBC' => '0xCE8C',
2936
-				'0xBE' => '0xCE8E',		'0xBF' => '0xCE8F',		'0xC0' => '0xCE90',
2937
-				'0xC8' => '0xCE98',		'0xCA' => '0xCE9A',		'0xCC' => '0xCE9C',
2938
-				'0xCD' => '0xCE9D',		'0xCF' => '0xCE9F',		'0xDA' => '0xCEAA',
2939
-				'0xE8' => '0xCEB8',		'0xEA' => '0xCEBA',		'0xEC' => '0xCEBC',
2940
-				'0xEE' => '0xCEBE',		'0xEF' => '0xCEBF',		'0xC2' => '0xFF',
2941
-				'0xBD' => '0xC2BD',		'0xED' => '0xCEBD',		'0xB2' => '0xC2B2',
2942
-				'0xA0' => '0xC2A0',		'0xA3' => '0xC2A3',		'0xA4' => '0xC2A4',
2943
-				'0xA5' => '0xC2A5',		'0xA6' => '0xC2A6',		'0xA7' => '0xC2A7',
2944
-				'0xA8' => '0xC2A8',		'0xA9' => '0xC2A9',		'0xAB' => '0xC2AB',
2945
-				'0xAC' => '0xC2AC',		'0xAD' => '0xC2AD',		'0xAE' => '0xC2AE',
2946
-				'0xB0' => '0xC2B0',		'0xB1' => '0xC2B1',		'0xB3' => '0xC2B3',
2947
-				'0xB5' => '0xC2B5',		'0xB6' => '0xC2B6',		'0xB7' => '0xC2B7',
2948
-				'0xBB' => '0xC2BB',		'0xE2' => '0xCEB2',		'0x80' => '0xD2',
2949
-				'0x82' => '0xE2809A',	'0x84' => '0xE2809E',	'0x85' => '0xE280A6',
2950
-				'0x86' => '0xE280A0',	'0xA1' => '0xCE85',		'0xA2' => '0xCE86',
2951
-				'0x87' => '0xE280A1',	'0x89' => '0xE280B0',	'0xB9' => '0xCE89',
2952
-				'0x8B' => '0xE280B9',	'0x91' => '0xE28098',	'0x99' => '0xE284A2',
2953
-				'0x92' => '0xE28099',	'0x93' => '0xE2809C',	'0x94' => '0xE2809D',
2954
-				'0x95' => '0xE280A2',	'0x96' => '0xE28093',	'0x97' => '0xE28094',
2955
-				'0x9B' => '0xE280BA',	'0xAF' => '0xE28095',	'0xB4' => '0xCE84',
2956
-				'0xC1' => '0xCE91',		'0xC3' => '0xCE93',		'0xC4' => '0xCE94',
2957
-				'0xC5' => '0xCE95',		'0xC6' => '0xCE96',		'0x83' => '0xC692',
2958
-				'0xC7' => '0xCE97',		'0xC9' => '0xCE99',		'0xCB' => '0xCE9B',
2959
-				'0xD0' => '0xCEA0',		'0xD1' => '0xCEA1',		'0xD3' => '0xCEA3',
2960
-				'0xD4' => '0xCEA4',		'0xD5' => '0xCEA5',		'0xD6' => '0xCEA6',
2961
-				'0xD7' => '0xCEA7',		'0xD8' => '0xCEA8',		'0xD9' => '0xCEA9',
2962
-				'0xDB' => '0xCEAB',		'0xDC' => '0xCEAC',		'0xDD' => '0xCEAD',
2963
-				'0xDE' => '0xCEAE',		'0xDF' => '0xCEAF',		'0xE0' => '0xCEB0',
2964
-				'0xE1' => '0xCEB1',		'0xE3' => '0xCEB3',		'0xE4' => '0xCEB4',
2965
-				'0xE5' => '0xCEB5',		'0xE6' => '0xCEB6',		'0xE7' => '0xCEB7',
2966
-				'0xE9' => '0xCEB9',		'0xEB' => '0xCEBB',		'0xF0' => '0xCF80',
2967
-				'0xF1' => '0xCF81',		'0xF2' => '0xCF82',		'0xF3' => '0xCF83',
2968
-				'0xF4' => '0xCF84',		'0xF5' => '0xCF85',		'0xF6' => '0xCF86',
2969
-				'0xF7' => '0xCF87',		'0xF8' => '0xCF88',		'0xF9' => '0xCF89',
2970
-				'0xFA' => '0xCF8A',		'0xFB' => '0xCF8B',		'0xFC' => '0xCF8C',
2971
-				'0xFD' => '0xCF8D',		'0xFE' => '0xCF8E',
2929
+				'0x81' => '\'\'', '0x88' => '\'\'', '0x8A' => '\'\'',
2930
+				'0x8C' => '\'\'', '0x8D' => '\'\'', '0x8E' => '\'\'',
2931
+				'0x8F' => '\'\'', '0x90' => '\'\'', '0x98' => '\'\'',
2932
+				'0x9A' => '\'\'', '0x9C' => '\'\'', '0x9D' => '\'\'',
2933
+				'0x9E' => '\'\'', '0x9F' => '\'\'', '0xAA' => '\'\'',
2934
+				'0xD2' => '0xE282AC', '0xFF' => '0xCE92', '0xCE' => '0xCE9E',
2935
+				'0xB8' => '0xCE88', '0xBA' => '0xCE8A', '0xBC' => '0xCE8C',
2936
+				'0xBE' => '0xCE8E', '0xBF' => '0xCE8F', '0xC0' => '0xCE90',
2937
+				'0xC8' => '0xCE98', '0xCA' => '0xCE9A', '0xCC' => '0xCE9C',
2938
+				'0xCD' => '0xCE9D', '0xCF' => '0xCE9F', '0xDA' => '0xCEAA',
2939
+				'0xE8' => '0xCEB8', '0xEA' => '0xCEBA', '0xEC' => '0xCEBC',
2940
+				'0xEE' => '0xCEBE', '0xEF' => '0xCEBF', '0xC2' => '0xFF',
2941
+				'0xBD' => '0xC2BD', '0xED' => '0xCEBD', '0xB2' => '0xC2B2',
2942
+				'0xA0' => '0xC2A0', '0xA3' => '0xC2A3', '0xA4' => '0xC2A4',
2943
+				'0xA5' => '0xC2A5', '0xA6' => '0xC2A6', '0xA7' => '0xC2A7',
2944
+				'0xA8' => '0xC2A8', '0xA9' => '0xC2A9', '0xAB' => '0xC2AB',
2945
+				'0xAC' => '0xC2AC', '0xAD' => '0xC2AD', '0xAE' => '0xC2AE',
2946
+				'0xB0' => '0xC2B0', '0xB1' => '0xC2B1', '0xB3' => '0xC2B3',
2947
+				'0xB5' => '0xC2B5', '0xB6' => '0xC2B6', '0xB7' => '0xC2B7',
2948
+				'0xBB' => '0xC2BB', '0xE2' => '0xCEB2', '0x80' => '0xD2',
2949
+				'0x82' => '0xE2809A', '0x84' => '0xE2809E', '0x85' => '0xE280A6',
2950
+				'0x86' => '0xE280A0', '0xA1' => '0xCE85', '0xA2' => '0xCE86',
2951
+				'0x87' => '0xE280A1', '0x89' => '0xE280B0', '0xB9' => '0xCE89',
2952
+				'0x8B' => '0xE280B9', '0x91' => '0xE28098', '0x99' => '0xE284A2',
2953
+				'0x92' => '0xE28099', '0x93' => '0xE2809C', '0x94' => '0xE2809D',
2954
+				'0x95' => '0xE280A2', '0x96' => '0xE28093', '0x97' => '0xE28094',
2955
+				'0x9B' => '0xE280BA', '0xAF' => '0xE28095', '0xB4' => '0xCE84',
2956
+				'0xC1' => '0xCE91', '0xC3' => '0xCE93', '0xC4' => '0xCE94',
2957
+				'0xC5' => '0xCE95', '0xC6' => '0xCE96', '0x83' => '0xC692',
2958
+				'0xC7' => '0xCE97', '0xC9' => '0xCE99', '0xCB' => '0xCE9B',
2959
+				'0xD0' => '0xCEA0', '0xD1' => '0xCEA1', '0xD3' => '0xCEA3',
2960
+				'0xD4' => '0xCEA4', '0xD5' => '0xCEA5', '0xD6' => '0xCEA6',
2961
+				'0xD7' => '0xCEA7', '0xD8' => '0xCEA8', '0xD9' => '0xCEA9',
2962
+				'0xDB' => '0xCEAB', '0xDC' => '0xCEAC', '0xDD' => '0xCEAD',
2963
+				'0xDE' => '0xCEAE', '0xDF' => '0xCEAF', '0xE0' => '0xCEB0',
2964
+				'0xE1' => '0xCEB1', '0xE3' => '0xCEB3', '0xE4' => '0xCEB4',
2965
+				'0xE5' => '0xCEB5', '0xE6' => '0xCEB6', '0xE7' => '0xCEB7',
2966
+				'0xE9' => '0xCEB9', '0xEB' => '0xCEBB', '0xF0' => '0xCF80',
2967
+				'0xF1' => '0xCF81', '0xF2' => '0xCF82', '0xF3' => '0xCF83',
2968
+				'0xF4' => '0xCF84', '0xF5' => '0xCF85', '0xF6' => '0xCF86',
2969
+				'0xF7' => '0xCF87', '0xF8' => '0xCF88', '0xF9' => '0xCF89',
2970
+				'0xFA' => '0xCF8A', '0xFB' => '0xCF8B', '0xFC' => '0xCF8C',
2971
+				'0xFD' => '0xCF8D', '0xFE' => '0xCF8E',
2972 2972
 			),
2973 2973
 		);
2974 2974
 
@@ -3205,7 +3205,7 @@  discard block
 block discarded – undo
3205 3205
 		return $string;
3206 3206
 
3207 3207
 	// This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8)
3208
-	$new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function ($matches) {return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";';}, $string);
3208
+	$new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function($matches) {return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";'; }, $string);
3209 3209
 
3210 3210
 	// @todo Add more possible fixes here. For example, fix incorrect array lengths, try to handle truncated strings gracefully, etc.
3211 3211
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3205,7 +3205,9 @@
 block discarded – undo
3205 3205
 		return $string;
3206 3206
 
3207 3207
 	// This bit fixes incorrect string lengths, which can happen if the character encoding was changed (e.g. conversion to UTF-8)
3208
-	$new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function ($matches) {return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";';}, $string);
3208
+	$new_string = preg_replace_callback('~\bs:(\d+):"(.*?)";(?=$|[bidsa]:|[{}]|N;)~s', function ($matches)
3209
+	{
3210
+return 's:' . strlen($matches[2]) . ':"' . $matches[2] . '";';}, $string);
3209 3211
 
3210 3212
 	// @todo Add more possible fixes here. For example, fix incorrect array lengths, try to handle truncated strings gracefully, etc.
3211 3213
 
Please login to merge, or discard this patch.