summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
-rw-r--r--ext/pdo_pgsql/pgsql_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c
index a8229fe88e..5a970371c0 100644
--- a/ext/pdo_pgsql/pgsql_driver.c
+++ b/ext/pdo_pgsql/pgsql_driver.c
@@ -813,7 +813,7 @@ static PHP_METHOD(PDO, pgsqlCopyToFile)
if (ret == -1) {
break; /* done */
} else if (ret > 0) {
- if (php_stream_write(stream, csv, ret) != ret) {
+ if (php_stream_write(stream, csv, ret) != (size_t)ret) {
pdo_pgsql_error_msg(dbh, PGRES_FATAL_ERROR, "Unable to write to file");
PQfreemem(csv);
php_stream_close(stream);