diff options
author | George Peter Banyard <girgias@php.net> | 2020-09-12 23:41:25 +0200 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2020-09-14 01:07:58 +0200 |
commit | c8d47cf8756c916eba110f06e728ffe994b6c90b (patch) | |
tree | ca27e54485e1cbdb678869cd3e39fce7d0575568 /ext/pdo_oci | |
parent | 71de8fe9b89f2e5261746fc871d5b8bb10f1f0e5 (diff) | |
download | php-git-c8d47cf8756c916eba110f06e728ffe994b6c90b.tar.gz |
Convert warnings to assetions in OCI PDO driver
Closes GH-6118
Diffstat (limited to 'ext/pdo_oci')
-rw-r--r-- | ext/pdo_oci/oci_statement.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index 6e121dd9b7..0ab043f041 100644 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -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; @@ -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); @@ -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; |