Skip to content

Commit

Permalink
Convert warnings to assetions in OCI PDO driver
Browse files Browse the repository at this point in the history
Closes GH-6118
  • Loading branch information
Girgias committed Sep 13, 2020
1 parent 71de8fe commit c8d47cf
Showing 1 changed file with 3 additions and 13 deletions.
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

0 comments on commit c8d47cf

Please sign in to comment.