File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ PHP NEWS
24
24
- PDO_PgSQL:
25
25
. Fixed bug #78983 (pdo_pgsql config.w32 cannot find libpq-fe.h). (SATŌ
26
26
Kentarō)
27
+ . Fixed bug #78980 (pgsqlGetNotify() overlooks dead connection). (SATŌ
28
+ Kentarō)
27
29
28
30
18 Dec 2019, PHP 7.3.13
29
31
Original file line number Diff line number Diff line change @@ -1071,13 +1071,21 @@ static PHP_METHOD(PDO, pgsqlGetNotify)
1071
1071
1072
1072
H = (pdo_pgsql_db_handle * )dbh -> driver_data ;
1073
1073
1074
- PQconsumeInput (H -> server );
1074
+ if (!PQconsumeInput (H -> server )) {
1075
+ pdo_pgsql_error (dbh , PGRES_FATAL_ERROR , NULL );
1076
+ PDO_HANDLE_DBH_ERR ();
1077
+ RETURN_FALSE ;
1078
+ }
1075
1079
pgsql_notify = PQnotifies (H -> server );
1076
1080
1077
1081
if (ms_timeout && !pgsql_notify ) {
1078
1082
php_pollfd_for_ms (PQsocket (H -> server ), PHP_POLLREADABLE , (int )ms_timeout );
1079
1083
1080
- PQconsumeInput (H -> server );
1084
+ if (!PQconsumeInput (H -> server )) {
1085
+ pdo_pgsql_error (dbh , PGRES_FATAL_ERROR , NULL );
1086
+ PDO_HANDLE_DBH_ERR ();
1087
+ RETURN_FALSE ;
1088
+ }
1081
1089
pgsql_notify = PQnotifies (H -> server );
1082
1090
}
1083
1091
You can’t perform that action at this time.
0 commit comments