]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorJoe Watkins <krakjoe@php.net>
Fri, 20 Jan 2017 20:11:26 +0000 (20:11 +0000)
committerJoe Watkins <krakjoe@php.net>
Fri, 20 Jan 2017 20:11:49 +0000 (20:11 +0000)
* PHP-7.0:
  Fixed #73959 - lastInsertId fails to throw an exception in pdsql

1  2 
NEWS
ext/pdo_pgsql/pgsql_driver.c

diff --cc NEWS
Simple merge
index 045d32e7e5175c26a39e5da6b8923c2ea295b19b,b04cadeda9e3155def8309d60f41226e1811ab18..52a9b8f285e4a905e0a4fcc5b8fd0f5c9be267b2
@@@ -378,10 -387,16 +378,9 @@@ static char *pdo_pgsql_last_insert_id(p
                id = estrdup((char *)PQgetvalue(res, 0, 0));
                *len = PQgetlength(res, 0, 0);
        } else {
 -              if (savepoint) {
 -                      (void)PQexec(H->server, "ROLLBACK TO SAVEPOINT _php_lastid_savepoint");
 -              }
                pdo_pgsql_error(dbh, status, pdo_pgsql_sqlstate(res));
-               *len = spprintf(&id, 0, ZEND_LONG_FMT, (zend_long) H->pgoid);
        }
  
 -      if (savepoint) {
 -              (void)PQexec(H->server, "RELEASE SAVEPOINT _php_lastid_savepoint");
 -      }
 -
        if (res) {
                PQclear(res);
        }