- Reverted previous fix for bug #46274 and properly fixed it

- Fixed bug #48060
# Also added tests for pdo_oci as it's the only other driver currently
# using streams: no regression found
This commit is contained in:
Matteo Beccati 2009-04-23 13:22:12 +00:00
parent 763248af68
commit 7db1207d47
5 changed files with 167 additions and 8 deletions

View file

@ -619,8 +619,14 @@ static int pgsql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned
return 0;
} else {
*ptr = php_pdo_pgsql_unescape_bytea(*ptr, &tmp_len);
*len = tmp_len;
*caller_frees = 1;
if (!tmp_len) {
/* Empty string, return as empty stream */
*ptr = (char *)php_stream_memory_open(TEMP_STREAM_READONLY, "", 0);
*len = 0;
} else {
*len = tmp_len;
*caller_frees = 1;
}
}
break;
case PDO_PARAM_NULL: