Skip to content

Commit

Permalink
Added comment to explain the change
Browse files Browse the repository at this point in the history
  • Loading branch information
yitam committed Jun 22, 2020
1 parent 78ba40f commit e210371
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/shared/core_stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2368,6 +2368,10 @@ void finalize_output_parameters( _Inout_ sqlsrv_stmt* stmt, _In_opt_ bool except
{
if (Z_ISUNDEF(stmt->output_params))
return;

// If an error occurs or an exception is thrown during an execution, the values of any output
// parameters or columns are undefined. Therefore, do not depend on them having any specific
// values, because the ODBC driver may or may not have modified them.
if (exception_thrown) {
zend_hash_clean(Z_ARRVAL(stmt->output_params));
return;
Expand Down

0 comments on commit e210371

Please sign in to comment.