|
@@ -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.