Skip to content

Commit 7a2f570

Browse files
committed
Changed return value for lastInsertId for 8.1+
1 parent f52fb48 commit 7a2f570

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

source/pdo_sqlsrv/pdo_dbh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ zend_string * pdo_sqlsrv_dbh_last_id(_Inout_ pdo_dbh_t *dbh, _In_ const zend_str
16161616
str[0] = '\0';
16171617
return str;
16181618
#else
1619-
return NULL;
1619+
return ZSTR_EMPTY_ALLOC();
16201620
#endif
16211621
}
16221622

test/functional/pdo_sqlsrv/pdo_lastInsertId.phpt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ try {
4040

4141

4242
?>
43-
--EXPECTREGEX--
44-
string\(3\) "200"
45-
string\(3\) "102"
46-
(string\(0\) ""|bool\(false\))
43+
--EXPECT--
44+
string(3) "200"
45+
string(3) "102"
46+
string(0) ""

0 commit comments

Comments
 (0)