mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.4'
This commit is contained in:
commit
f7ca8138e7
1 changed files with 7 additions and 1 deletions
|
@ -39,8 +39,14 @@ static bool pgsql_handle_in_transaction(pdo_dbh_t *dbh);
|
|||
|
||||
static char * _pdo_pgsql_trim_message(const char *message, int persistent)
|
||||
{
|
||||
size_t i = strlen(message)-1;
|
||||
size_t i = strlen(message);
|
||||
char *tmp;
|
||||
if (UNEXPECTED(i == 0)) {
|
||||
tmp = pemalloc(1, persistent);
|
||||
tmp[0] = '\0';
|
||||
return tmp;
|
||||
}
|
||||
--i;
|
||||
|
||||
if (i>1 && (message[i-1] == '\r' || message[i-1] == '\n') && message[i] == '.') {
|
||||
--i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue