Skip to content

Commit

Permalink
Changed return value for PDO::lastInsertId for 8.1+ (#1332)
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Nov 19, 2021
1 parent f52fb48 commit 14aa449
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/pdo_sqlsrv/pdo_dbh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ zend_string * pdo_sqlsrv_dbh_last_id(_Inout_ pdo_dbh_t *dbh, _In_ const zend_str
str[0] = '\0';
return str;
#else
return NULL;
return ZSTR_EMPTY_ALLOC();
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions test/functional/pdo_sqlsrv/pdo_lastInsertId.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ try {


?>
--EXPECTREGEX--
string\(3\) "200"
string\(3\) "102"
(string\(0\) ""|bool\(false\))
--EXPECT--
string(3) "200"
string(3) "102"
string(0) ""

0 comments on commit 14aa449

Please sign in to comment.