Skip to content

Convert warnings to assetions in OCI PDO driver #6118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions ext/pdo_oci/oci_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,7 @@ static sb4 oci_bind_input_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, dv
pdo_oci_bound_param *P = (pdo_oci_bound_param*)param->driver_data;
zval *parameter;

if (!param) {
php_error_docref(NULL, E_WARNING, "param is NULL in oci_bind_input_cb; this should not happen");
return OCI_ERROR;
}
ZEND_ASSERT(param);

*indpp = &P->indicator;

Expand Down Expand Up @@ -236,10 +233,7 @@ static sb4 oci_bind_output_cb(dvoid *ctx, OCIBind *bindp, ub4 iter, ub4 index, d
pdo_oci_bound_param *P = (pdo_oci_bound_param*)param->driver_data;
zval *parameter;

if (!param) {
php_error_docref(NULL, E_WARNING, "param is NULL in oci_bind_output_cb; this should not happen");
return OCI_ERROR;
}
ZEND_ASSERT(param);

if (Z_ISREF(param->parameter))
parameter = Z_REFVAL(param->parameter);
Expand Down Expand Up @@ -509,11 +503,7 @@ static sb4 oci_define_callback(dvoid *octxp, OCIDefine *define, ub4 iter, dvoid
*alenpp = &col->datalen;
*indpp = (dvoid *)&col->indicator;
break;

default:
php_error_docref(NULL, E_WARNING,
"unhandled datatype in oci_define_callback; this should not happen");
return OCI_ERROR;
EMPTY_SWITCH_DEFAULT_CASE();
}

return OCI_CONTINUE;
Expand Down