We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c246c52 commit b9c296cCopy full SHA for b9c296c
ext/pgsql/pgsql.c
@@ -2489,9 +2489,13 @@ PHP_FUNCTION(pg_lo_open)
2489
} else if (zend_string_equals_literal(mode, "w")) {
2490
pgsql_mode |= INV_WRITE;
2491
create = true;
2492
- } else if (zend_string_equals_literal(mode, "r+") || zend_string_equals_literal(mode, "w+")) {
+ } else if (zend_string_equals_literal(mode, "r+")) {
2493
pgsql_mode |= INV_READ;
2494
2495
+ } else if (zend_string_equals_literal(mode, "w+")) {
2496
+ pgsql_mode |= INV_READ;
2497
+ pgsql_mode |= INV_WRITE;
2498
+ create = true;
2499
} else {
2500
zend_value_error("Mode must be one of 'r', 'r+', 'w', or 'w+'");
2501
RETURN_THROWS();
0 commit comments