Passed
Push — release-2.1 ( 8c6d9c...8593cf )
by John
04:22 queued 10s
created
Sources/Subs-Db-postgresql.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 		display_db_error();
76 76
 
77 77
 	// We need to escape ' and \
78
-	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
78
+	$db_passwd = str_replace(array('\\', '\''), array('\\\\', '\\\''), $db_passwd);
79 79
 
80 80
 	// Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch.
81 81
 	set_error_handler(function($errno, $errstr) {
82
-		throw new ErrorException($errstr, $errno);});
82
+		throw new ErrorException($errstr, $errno); });
83 83
 	try
84 84
 	{
85 85
 		if (!empty($db_options['persist']))
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 	if (filter_var($error_array[2], FILTER_VALIDATE_IP) === false)
939 939
 		$error_array[2] = null;
940 940
 
941
-	if(empty($db_persist))
941
+	if (empty($db_persist))
942 942
 	{ // without pooling
943 943
 		if (empty($pg_error_data_prep))
944 944
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,7 +78,8 @@  discard block
 block discarded – undo
78 78
 	$db_passwd = str_replace(array('\\','\''), array('\\\\','\\\''), $db_passwd);
79 79
 
80 80
 	// Since pg_connect doesn't feed error info to pg_last_error, we have to catch issues with a try/catch.
81
-	set_error_handler(function($errno, $errstr) {
81
+	set_error_handler(function($errno, $errstr)
82
+	{
82 83
 		throw new ErrorException($errstr, $errno);});
83 84
 	try
84 85
 	{
@@ -939,7 +940,8 @@  discard block
 block discarded – undo
939 940
 		$error_array[2] = null;
940 941
 
941 942
 	if(empty($db_persist))
942
-	{ // without pooling
943
+	{
944
+// without pooling
943 945
 		if (empty($pg_error_data_prep))
944 946
 			$pg_error_data_prep = pg_prepare($db_connection, 'smf_log_errors',
945 947
 				'INSERT INTO ' . $db_prefix . 'log_errors
@@ -950,7 +952,8 @@  discard block
 block discarded – undo
950 952
 		pg_execute($db_connection, 'smf_log_errors', $error_array);
951 953
 	}
952 954
 	else
953
-	{ //with pooling
955
+	{
956
+//with pooling
954 957
 		$pg_error_data_prep = pg_prepare($db_connection, '',
955 958
 			'INSERT INTO ' . $db_prefix . 'log_errors
956 959
 				(id_member, log_time, ip, url, message, session, error_type, file, line, backtrace)
Please login to merge, or discard this patch.