From 37652336c7a8a740b5d922edff66c8cea885c108 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Mon, 24 Sep 2018 16:38:39 +1000 Subject: And strip trailing tabs too... --- ext/oci8/oci8.c | 2 +- ext/oci8/oci8_collection.c | 58 ++--- ext/oci8/oci8_interface.c | 284 ++++++++++----------- ext/oci8/oci8_lob.c | 94 +++---- ext/oci8/oci8_statement.c | 148 +++++------ ext/oci8/tests/array_bind_001.phpt | 2 +- ext/oci8/tests/array_bind_002.phpt | 2 +- ext/oci8/tests/array_bind_003.phpt | 2 +- ext/oci8/tests/array_bind_004.phpt | 2 +- ext/oci8/tests/array_bind_005.phpt | 2 +- ext/oci8/tests/array_bind_006.phpt | 2 +- ext/oci8/tests/array_bind_007.phpt | 2 +- ext/oci8/tests/array_bind_008.phpt | 2 +- ext/oci8/tests/array_bind_009.phpt | 2 +- ext/oci8/tests/array_bind_010.phpt | 2 +- ext/oci8/tests/array_bind_011.phpt | 2 +- ext/oci8/tests/array_bind_012.phpt | 2 +- ext/oci8/tests/array_bind_013.phpt | 2 +- ext/oci8/tests/array_bind_014.phpt | 2 +- ext/oci8/tests/array_bind_date.phpt | 2 +- ext/oci8/tests/array_bind_date1.phpt | 2 +- ext/oci8/tests/array_bind_float.phpt | 2 +- ext/oci8/tests/array_bind_float1.phpt | 2 +- ext/oci8/tests/array_bind_int.phpt | 2 +- ext/oci8/tests/array_bind_int1.phpt | 2 +- ext/oci8/tests/array_bind_str.phpt | 2 +- ext/oci8/tests/array_bind_str1.phpt | 2 +- ext/oci8/tests/bind_char_1.phpt | 4 +- ext/oci8/tests/bind_char_1_11gR1.phpt | 4 +- ext/oci8/tests/bind_char_2.phpt | 4 +- ext/oci8/tests/bind_char_2_11gR1.phpt | 4 +- ext/oci8/tests/bind_char_3_11gR1.phpt | 2 +- ext/oci8/tests/bind_char_4.phpt | 2 +- ext/oci8/tests/bind_char_4_11gR1.phpt | 2 +- ext/oci8/tests/bug27303_1.phpt | 4 +- ext/oci8/tests/bug27303_1_11gR1.phpt | 2 +- ext/oci8/tests/bug27303_2.phpt | 4 +- ext/oci8/tests/bug27303_2_11gR1.phpt | 4 +- ext/oci8/tests/bug27303_3.phpt | 4 +- ext/oci8/tests/bug27303_4.phpt | 4 +- ext/oci8/tests/bug27303_4_11gR1.phpt | 4 +- ext/oci8/tests/bug32325.phpt | 6 +- ext/oci8/tests/bug35973.phpt | 2 +- ext/oci8/tests/bug36010.phpt | 2 +- ext/oci8/tests/bug37220.phpt | 2 +- ext/oci8/tests/bug37581.phpt | 2 +- ext/oci8/tests/bug38161.phpt | 2 +- ext/oci8/tests/bug40078.phpt | 2 +- ext/oci8/tests/bug41069.phpt | 2 +- ext/oci8/tests/bug43497.phpt | 16 +- ext/oci8/tests/bug51253.phpt | 2 +- ext/oci8/tests/bug71600.phpt | 6 +- ext/oci8/tests/close.phpt | 4 +- ext/oci8/tests/coll_009.phpt | 2 +- ext/oci8/tests/coll_009_func.phpt | 2 +- ext/oci8/tests/coll_010.phpt | 2 +- ext/oci8/tests/coll_010_func.phpt | 2 +- ext/oci8/tests/coll_011.phpt | 2 +- ext/oci8/tests/coll_011_func.phpt | 2 +- ext/oci8/tests/coll_012.phpt | 2 +- ext/oci8/tests/coll_012_func.phpt | 2 +- ext/oci8/tests/coll_013.phpt | 2 +- ext/oci8/tests/coll_013_func.phpt | 2 +- ext/oci8/tests/coll_014.phpt | 2 +- ext/oci8/tests/coll_014_func.phpt | 2 +- ext/oci8/tests/coll_015.phpt | 2 +- ext/oci8/tests/coll_015_func.phpt | 2 +- ext/oci8/tests/coll_016.phpt | 2 +- ext/oci8/tests/coll_016_func.phpt | 2 +- ext/oci8/tests/coll_017.phpt | 2 +- ext/oci8/tests/coll_017_func.phpt | 2 +- ext/oci8/tests/commit_001.phpt | 2 +- ext/oci8/tests/commit_old.phpt | 2 +- ext/oci8/tests/conn_attr_4.phpt | 2 +- ext/oci8/tests/connect.phpt | 2 +- ext/oci8/tests/connect_old.phpt | 2 +- ext/oci8/tests/connect_scope1.phpt | 2 +- ext/oci8/tests/connect_scope2.phpt | 2 +- ext/oci8/tests/connect_scope_try1.phpt | 2 +- ext/oci8/tests/connect_scope_try2.phpt | 2 +- ext/oci8/tests/connect_scope_try3.phpt | 2 +- ext/oci8/tests/connect_scope_try4.phpt | 2 +- ext/oci8/tests/connect_scope_try5.phpt | 2 +- ext/oci8/tests/connect_scope_try6.phpt | 2 +- ext/oci8/tests/connect_with_charset_001.phpt | 2 +- ext/oci8/tests/connect_without_oracle_home.phpt | 2 +- ext/oci8/tests/connect_without_oracle_home_11.phpt | 2 +- .../tests/connect_without_oracle_home_old.phpt | 2 +- .../tests/connect_without_oracle_home_old_11.phpt | 2 +- ext/oci8/tests/debug.phpt | 2 +- ext/oci8/tests/default_prefetch.phpt | 2 +- ext/oci8/tests/default_prefetch0.phpt | 2 +- ext/oci8/tests/default_prefetch1.phpt | 2 +- ext/oci8/tests/default_prefetch2.phpt | 2 +- ext/oci8/tests/define2.phpt | 2 +- ext/oci8/tests/define3.phpt | 4 +- ext/oci8/tests/descriptors.phpt | 2 +- ext/oci8/tests/edition_2.phpt | 2 +- ext/oci8/tests/exec_fetch.phpt | 2 +- ext/oci8/tests/execute_mode.phpt | 2 +- ext/oci8/tests/fetch.phpt | 2 +- ext/oci8/tests/fetch_all.phpt | 2 +- ext/oci8/tests/fetch_all1.phpt | 2 +- ext/oci8/tests/fetch_all2.phpt | 2 +- ext/oci8/tests/fetch_array.phpt | 2 +- ext/oci8/tests/fetch_into1.phpt | 2 +- ext/oci8/tests/fetch_into2.phpt | 2 +- ext/oci8/tests/lob_001.phpt | Bin 2151 -> 2150 bytes ext/oci8/tests/lob_003.phpt | Bin 1697 -> 1696 bytes ext/oci8/tests/lob_004.phpt | 2 +- ext/oci8/tests/lob_005.phpt | 2 +- ext/oci8/tests/lob_006.phpt | Bin 1765 -> 1764 bytes ext/oci8/tests/lob_007.phpt | 2 +- ext/oci8/tests/lob_008.phpt | 2 +- ext/oci8/tests/lob_009.phpt | 2 +- ext/oci8/tests/lob_010.phpt | 2 +- ext/oci8/tests/lob_011.phpt | 2 +- ext/oci8/tests/lob_012.phpt | 2 +- ext/oci8/tests/lob_013.phpt | 2 +- ext/oci8/tests/lob_014.phpt | 2 +- ext/oci8/tests/lob_015.phpt | 2 +- ext/oci8/tests/lob_016.phpt | 2 +- ext/oci8/tests/lob_017.phpt | 2 +- ext/oci8/tests/lob_018.phpt | 2 +- ext/oci8/tests/lob_019.phpt | Bin 1617 -> 1616 bytes ext/oci8/tests/lob_020.phpt | Bin 3145 -> 3144 bytes ext/oci8/tests/lob_021.phpt | 2 +- ext/oci8/tests/lob_022.phpt | 2 +- ext/oci8/tests/lob_023.phpt | 2 +- ext/oci8/tests/lob_024.phpt | 2 +- ext/oci8/tests/lob_025.phpt | 2 +- ext/oci8/tests/lob_026.phpt | 2 +- ext/oci8/tests/lob_027.phpt | 4 +- ext/oci8/tests/lob_031.phpt | 2 +- ext/oci8/tests/lob_032.phpt | 2 +- ext/oci8/tests/lob_033.phpt | 2 +- ext/oci8/tests/lob_034.phpt | 2 +- ext/oci8/tests/lob_035.phpt | 2 +- ext/oci8/tests/lob_042.phpt | 4 +- ext/oci8/tests/lob_044.phpt | 2 +- ext/oci8/tests/lob_temp.phpt | 2 +- ext/oci8/tests/lob_temp1.phpt | 2 +- ext/oci8/tests/pecl_bug10194.phpt | 4 +- ext/oci8/tests/persistent.phpt | 4 +- ext/oci8/tests/prefetch_old.phpt | 2 +- ext/oci8/tests/privileged_connect.phpt | 2 +- ext/oci8/tests/privileged_connect1.phpt | 2 +- ext/oci8/tests/select_null.phpt | 2 +- ext/oci8/tests/serverversion.phpt | 2 +- ext/oci8/tests/statement_cache.phpt | 2 +- ext/oci8/tests/uncommitted.phpt | 4 +- 151 files changed, 462 insertions(+), 462 deletions(-) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 4543974aab..e0d55aeaad 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -1872,7 +1872,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char if ((tmp_val != NULL) && (Z_TYPE_P(tmp_val) == IS_RESOURCE)) { tmp = Z_RES_VAL_P(tmp_val); } - + if ((tmp_val != NULL) && (tmp != NULL) && (ZSTR_LEN(tmp->hash_key) == ZSTR_LEN(hashed_details.s)) && (memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s), diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index 6cf471272d..3744a84b9b 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -41,13 +41,13 @@ /* {{{ php_oci_collection_create() Create and return connection handle */ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, char *tdo, int tdo_len, char *schema, int schema_len) -{ +{ dvoid *dschp1 = NULL; dvoid *parmp1; dvoid *parmp2; php_oci_collection *collection; sword errstatus; - + collection = emalloc(sizeof(php_oci_collection)); collection->connection = connection; @@ -195,7 +195,7 @@ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, ch default: php_error_docref(NULL, E_WARNING, "unknown collection type %d", collection->coll_typecode); break; - } + } /* Create object to hold return table */ PHP_OCI_CALL_RETURN(errstatus, OCIObjectNew, @@ -221,7 +221,7 @@ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, ch PHP_OCI_REGISTER_RESOURCE(collection, le_collection); connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return collection; - + CLEANUP: if (dschp1) { @@ -230,7 +230,7 @@ CLEANUP: } connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); - php_oci_collection_close(collection); + php_oci_collection_close(collection); return NULL; } /* }}} */ @@ -241,7 +241,7 @@ int php_oci_collection_size(php_oci_collection *collection, sb4 *size) { php_oci_connection *connection = collection->connection; sword errstatus; - + PHP_OCI_CALL_RETURN(errstatus, OCICollSize, (connection->env, connection->err, collection->collection, (sb4 *)size)); if (errstatus != OCI_SUCCESS) { @@ -259,7 +259,7 @@ int php_oci_collection_size(php_oci_collection *collection, sb4 *size) int php_oci_collection_max(php_oci_collection *collection, zend_long *max) { php_oci_connection *connection = collection->connection; - + PHP_OCI_CALL_RETURN(*max, OCICollMax, (connection->env, collection->collection)); /* error handling is not necessary here? */ @@ -296,7 +296,7 @@ int php_oci_collection_append_null(php_oci_collection *collection) /* append NULL element */ PHP_OCI_CALL_RETURN(errstatus, OCICollAppend, (connection->env, connection->err, (dvoid *)0, &null_index, collection->collection)); - + if (errstatus != OCI_SUCCESS) { errstatus = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); @@ -341,7 +341,7 @@ int php_oci_collection_append_date(php_oci_collection *collection, char *date, i PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; } @@ -358,7 +358,7 @@ int php_oci_collection_append_number(php_oci_collection *collection, char *numbe sword errstatus; element_double = zend_strtod(number, NULL); - + PHP_OCI_CALL_RETURN(errstatus, OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number)); if (errstatus != OCI_SUCCESS) { @@ -396,7 +396,7 @@ int php_oci_collection_append_string(php_oci_collection *collection, char *eleme OCIString *ocistr = (OCIString *)0; php_oci_connection *connection = collection->connection; sword errstatus; - + PHP_OCI_CALL_RETURN(errstatus, OCIStringAssignText, (connection->env, connection->err, (CONST oratext *)element, element_len, &ocistr)); if (errstatus != OCI_SUCCESS) { @@ -433,12 +433,12 @@ int php_oci_collection_append(php_oci_collection *collection, char *element, int if (element_len == 0) { return php_oci_collection_append_null(collection); } - + switch(collection->element_typecode) { case OCI_TYPECODE_DATE: return php_oci_collection_append_date(collection, element, element_len); break; - + case OCI_TYPECODE_VARCHAR2 : return php_oci_collection_append_string(collection, element, element_len); break; @@ -478,7 +478,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind oratext buff[1024]; ub4 buff_len = 1024; sword errstatus; - + ZVAL_NULL(result_element); connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ @@ -500,7 +500,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + if (exists == 0) { /* element doesn't exist */ return 1; @@ -514,7 +514,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind switch (collection->element_typecode) { case OCI_TYPECODE_DATE: PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, element, 0, 0, 0, 0, &buff_len, buff)); - + if (errstatus != OCI_SUCCESS) { connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); @@ -523,7 +523,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind ZVAL_STRINGL(result_element, (char *)buff, buff_len); Z_STRVAL_P(result_element)[buff_len] = '\0'; - + return 0; break; @@ -531,9 +531,9 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind { OCIString *oci_string = *(OCIString **)element; text *str; - + PHP_OCI_CALL_RETURN(str, OCIStringPtr, (connection->env, oci_string)); - + if (str) { ZVAL_STRING(result_element, (char *)str); } @@ -554,7 +554,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind case OCI_TYPECODE_SMALLINT: /* SMALLINT */ { double double_number; - + PHP_OCI_CALL_RETURN(errstatus, OCINumberToReal, (connection->err, (CONST OCINumber *) element, (uword) sizeof(double), (dvoid *) &double_number)); if (errstatus != OCI_SUCCESS) { @@ -562,7 +562,7 @@ int php_oci_collection_element_get(php_oci_collection *collection, zend_long ind PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + ZVAL_DOUBLE(result_element, double_number); return 0; @@ -588,7 +588,7 @@ int php_oci_collection_element_set_null(php_oci_collection *collection, zend_lon /* set NULL element */ PHP_OCI_CALL_RETURN(errstatus, OCICollAssignElem, (connection->env, connection->err, (ub4) index, (dvoid *)"", &null_index, collection->collection)); - + if (errstatus != OCI_SUCCESS) { connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); @@ -634,7 +634,7 @@ int php_oci_collection_element_set_date(php_oci_collection *collection, zend_lon PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; } @@ -651,7 +651,7 @@ int php_oci_collection_element_set_number(php_oci_collection *collection, zend_l sword errstatus; element_double = zend_strtod(number, NULL); - + PHP_OCI_CALL_RETURN(errstatus, OCINumberFromReal, (connection->err, &element_double, sizeof(double), &oci_number)); if (errstatus != OCI_SUCCESS) { @@ -690,7 +690,7 @@ int php_oci_collection_element_set_string(php_oci_collection *collection, zend_l OCIString *ocistr = (OCIString *)0; php_oci_connection *connection = collection->connection; sword errstatus; - + PHP_OCI_CALL_RETURN(errstatus, OCIStringAssignText, (connection->env, connection->err, (CONST oratext *)element, element_len, &ocistr)); if (errstatus != OCI_SUCCESS) { @@ -728,12 +728,12 @@ int php_oci_collection_element_set(php_oci_collection *collection, zend_long ind if (value_len == 0) { return php_oci_collection_element_set_null(collection, index); } - + switch(collection->element_typecode) { case OCI_TYPECODE_DATE: return php_oci_collection_element_set_date(collection, index, value, value_len); break; - + case OCI_TYPECODE_VARCHAR2 : return php_oci_collection_element_set_string(collection, index, value, value_len); break; @@ -768,7 +768,7 @@ int php_oci_collection_assign(php_oci_collection *collection_dest, php_oci_colle { php_oci_connection *connection = collection_dest->connection; sword errstatus; - + PHP_OCI_CALL_RETURN(errstatus, OCICollAssign, (connection->env, connection->err, collection_from->collection, collection_dest->collection)); if (errstatus != OCI_SUCCESS) { @@ -798,7 +798,7 @@ void php_oci_collection_close(php_oci_collection *collection) connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ } } - + zend_list_delete(collection->connection->id); efree(collection); return; diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index c420514421..cd17386b5f 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -172,7 +172,7 @@ PHP_FUNCTION(oci_bind_by_name) zval *z_statement; zval *bind_var = NULL; php_oci_statement *statement; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz|ll", &z_statement, &name, &name_len, &bind_var, &maxlen, &type) == FAILURE) { return; } @@ -180,7 +180,7 @@ PHP_FUNCTION(oci_bind_by_name) if (type) { bind_type = (ub2) type; } - + PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement); if (php_oci_bind_by_name(statement, name, name_len, bind_var, maxlen, bind_type)) { @@ -202,7 +202,7 @@ PHP_FUNCTION(oci_bind_array_by_name) zval *z_statement; zval *bind_var = NULL; php_oci_statement *statement; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rszl|ll", &z_statement, &name, &name_len, &bind_var, &max_array_len, &max_item_len, &type) == FAILURE) { return; } @@ -212,12 +212,12 @@ PHP_FUNCTION(oci_bind_array_by_name) if (ZEND_NUM_ARGS() == 5 && max_item_len <= 0) { max_item_len = -1; } - + if (max_array_len <= 0) { php_error_docref(NULL, E_WARNING, "Maximum array length must be greater than zero"); RETURN_FALSE; } - + if (php_oci_bind_array_by_name(statement, name, (sb4) name_len, bind_var, max_array_len, max_item_len, type)) { RETURN_FALSE; } @@ -237,7 +237,7 @@ PHP_FUNCTION(oci_free_descriptor) return; } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; @@ -271,7 +271,7 @@ PHP_FUNCTION(oci_lob_save) return; } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; @@ -283,7 +283,7 @@ PHP_FUNCTION(oci_lob_save) php_error_docref(NULL, E_WARNING, "Offset parameter must be greater than or equal to 0"); RETURN_FALSE; } - + if (php_oci_lob_write(descriptor, (ub4) offset, data, (ub4) data_len, &bytes_written)) { RETURN_FALSE; } @@ -308,7 +308,7 @@ PHP_FUNCTION(oci_lob_import) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len) == FAILURE) { return; - } + } } if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { @@ -337,14 +337,14 @@ PHP_FUNCTION(oci_lob_load) if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); if (php_oci_lob_read(descriptor, -1, 0, &buffer, &buffer_len)) { @@ -380,24 +380,24 @@ PHP_FUNCTION(oci_lob_read) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_descriptor, oci_lob_class_entry_ptr, &length) == FAILURE) { return; - } + } } if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); if (length <= 0) { php_error_docref(NULL, E_WARNING, "Length parameter must be greater than 0"); RETURN_FALSE; } - + if (php_oci_lob_read(descriptor, length, descriptor->lob_current_position, &buffer, &buffer_len)) { RETURN_FALSE; - } + } if (buffer_len > 0) { zend_string *ret = zend_string_init(buffer, buffer_len, 0); efree(buffer); @@ -416,20 +416,20 @@ PHP_FUNCTION(oci_lob_eof) zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; ub4 lob_length; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (!php_oci_lob_get_length(descriptor, &lob_length)) { if (lob_length == descriptor->lob_current_position) { RETURN_TRUE; @@ -445,21 +445,21 @@ PHP_FUNCTION(oci_lob_tell) { zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - - RETURN_LONG(descriptor->lob_current_position); + + RETURN_LONG(descriptor->lob_current_position); } /* }}} */ @@ -469,20 +469,20 @@ PHP_FUNCTION(oci_lob_rewind) { zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + descriptor->lob_current_position = 0; RETURN_TRUE; @@ -497,7 +497,7 @@ PHP_FUNCTION(oci_lob_seek) php_oci_descriptor *descriptor; zend_long offset, whence = PHP_OCI_SEEK_SET; ub4 lob_length; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|l", &offset, &whence) == FAILURE) { return; @@ -506,14 +506,14 @@ PHP_FUNCTION(oci_lob_seek) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol|l", &z_descriptor, oci_lob_class_entry_ptr, &offset, &whence) == FAILURE) { return; - } + } } if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); if (php_oci_lob_get_length(descriptor, &lob_length)) { @@ -536,7 +536,7 @@ PHP_FUNCTION(oci_lob_seek) default: descriptor->lob_current_position = (offset > 0) ? (ub4) offset : 0; break; - } + } if (descriptor->lob_current_position > UB4MAXVAL) { php_error_docref(NULL, E_WARNING, "Invalid offset or LOB position"); RETURN_FALSE; @@ -552,20 +552,20 @@ PHP_FUNCTION(oci_lob_size) zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; ub4 lob_length; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (php_oci_lob_get_length(descriptor, &lob_length)) { RETURN_FALSE; } @@ -583,12 +583,12 @@ PHP_FUNCTION(oci_lob_write) zend_long write_len = 0; ub4 bytes_written; char *data; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &data, &data_len, &write_len) == FAILURE) { return; } - + if (ZEND_NUM_ARGS() == 2) { data_len = MIN((zend_long) data_len, write_len); } @@ -602,18 +602,18 @@ PHP_FUNCTION(oci_lob_write) data_len = MIN((zend_long) data_len, write_len); } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (data_len <= 0) { RETURN_LONG(0); } - + if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, (ub4) data_len, &bytes_written)) { RETURN_FALSE; } @@ -627,7 +627,7 @@ PHP_FUNCTION(oci_lob_append) { zval *tmp_dest, *tmp_from, *z_descriptor_dest = getThis(), *z_descriptor_from; php_oci_descriptor *descriptor_dest, *descriptor_from; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) { return; @@ -636,22 +636,22 @@ PHP_FUNCTION(oci_lob_append) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); RETURN_FALSE; } - + if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_dest, descriptor_dest); PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_from, descriptor_from); - + if (php_oci_lob_append(descriptor_dest, descriptor_from)) { RETURN_FALSE; } @@ -668,7 +668,7 @@ PHP_FUNCTION(oci_lob_truncate) php_oci_descriptor *descriptor; zend_long trim_length = 0; ub4 ub_trim_length; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &trim_length) == FAILURE) { return; @@ -677,9 +677,9 @@ PHP_FUNCTION(oci_lob_truncate) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &z_descriptor, oci_lob_class_entry_ptr, &trim_length) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; @@ -692,7 +692,7 @@ PHP_FUNCTION(oci_lob_truncate) ub_trim_length = (ub4) trim_length; PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (php_oci_lob_truncate(descriptor, ub_trim_length)) { RETURN_FALSE; } @@ -708,7 +708,7 @@ PHP_FUNCTION(oci_lob_erase) php_oci_descriptor *descriptor; ub4 bytes_erased; zend_long offset = -1, length = -1; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "|ll", &offset, &length) == FAILURE) { return; @@ -733,7 +733,7 @@ PHP_FUNCTION(oci_lob_erase) php_error_docref(NULL, E_WARNING, "Offset must be greater than or equal to 0"); RETURN_FALSE; } - + if (ZEND_NUM_ARGS() > 2 && length < 0) { php_error_docref(NULL, E_WARNING, "Length must be greater than or equal to 0"); RETURN_FALSE; @@ -761,7 +761,7 @@ PHP_FUNCTION(oci_lob_flush) zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; zend_long flush_flag = 0; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flush_flag) == FAILURE) { return; @@ -772,14 +772,14 @@ PHP_FUNCTION(oci_lob_flush) return; } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (descriptor->buffering == PHP_OCI_LOB_BUFFER_DISABLED) { /* buffering wasn't enabled, there is nothing to flush */ RETURN_FALSE; @@ -799,7 +799,7 @@ PHP_FUNCTION(ocisetbufferinglob) zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; zend_bool flag; - + if (getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "b", &flag) == FAILURE) { return; @@ -808,16 +808,16 @@ PHP_FUNCTION(ocisetbufferinglob) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ob", &z_descriptor, oci_lob_class_entry_ptr, &flag) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (php_oci_lob_set_buffering(descriptor, flag)) { RETURN_FALSE; } @@ -831,20 +831,20 @@ PHP_FUNCTION(ocigetbufferinglob) { zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (descriptor->buffering != PHP_OCI_LOB_BUFFER_DISABLED) { RETURN_TRUE; } @@ -859,29 +859,29 @@ PHP_FUNCTION(oci_lob_copy) zval *tmp_dest, *tmp_from, *z_descriptor_dest, *z_descriptor_from; php_oci_descriptor *descriptor_dest, *descriptor_from; zend_long length = 0; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO|l", &z_descriptor_dest, oci_lob_class_entry_ptr, &z_descriptor_from, oci_lob_class_entry_ptr, &length) == FAILURE) { return; } - + if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); RETURN_FALSE; } - + if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_from), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_dest, descriptor_dest); PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_from, descriptor_from); - + if (ZEND_NUM_ARGS() == 3 && length < 0) { php_error_docref(NULL, E_WARNING, "Length parameter must be greater than 0"); RETURN_FALSE; } - + if (ZEND_NUM_ARGS() == 2) { /* indicate that we want to copy from the current position to the end of the LOB */ length = -1; @@ -901,28 +901,28 @@ PHP_FUNCTION(oci_lob_is_equal) zval *tmp_first, *tmp_second, *z_descriptor_first, *z_descriptor_second; php_oci_descriptor *descriptor_first, *descriptor_second; boolean is_equal; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_descriptor_first, oci_lob_class_entry_ptr, &z_descriptor_second, oci_lob_class_entry_ptr) == FAILURE) { return; } - + if ((tmp_first = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The first argument should be valid descriptor object"); RETURN_FALSE; } - + if ((tmp_second = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_second), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_first, descriptor_first); PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp_second, descriptor_second); if (php_oci_lob_is_equal(descriptor_first, descriptor_second, &is_equal)) { RETURN_FALSE; } - + if (is_equal == TRUE) { RETURN_TRUE; } @@ -933,7 +933,7 @@ PHP_FUNCTION(oci_lob_is_equal) /* {{{ proto bool oci_lob_export([string filename [, int start [, int length]]]) Writes a large object into a file */ PHP_FUNCTION(oci_lob_export) -{ +{ zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; char *filename; @@ -947,7 +947,7 @@ PHP_FUNCTION(oci_lob_export) if (zend_parse_parameters(ZEND_NUM_ARGS(), "p|ll", &filename, &filename_len, &start, &length) == FAILURE) { return; } - + if (ZEND_NUM_ARGS() > 1 && start < 0) { php_error_docref(NULL, E_WARNING, "Start parameter must be greater than or equal to 0"); RETURN_FALSE; @@ -961,7 +961,7 @@ PHP_FUNCTION(oci_lob_export) if (zend_parse_parameters(ZEND_NUM_ARGS(), "Op|ll", &z_descriptor, oci_lob_class_entry_ptr, &filename, &filename_len, &start, &length) == FAILURE) { return; } - + if (ZEND_NUM_ARGS() > 2 && start < 0) { php_error_docref(NULL, E_WARNING, "Start parameter must be greater than or equal to 0"); RETURN_FALSE; @@ -976,13 +976,13 @@ PHP_FUNCTION(oci_lob_export) php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); - + if (php_oci_lob_get_length(descriptor, &lob_length)) { RETURN_FALSE; - } - + } + if (start == -1) { start = 0; } @@ -1026,7 +1026,7 @@ PHP_FUNCTION(oci_lob_export) if (buffer) { efree(buffer); } - + length -= tmp_bytes_read; descriptor->lob_current_position += tmp_bytes_read; start += tmp_bytes_read; @@ -1059,14 +1059,14 @@ PHP_FUNCTION(oci_lob_write_temporary) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os|l", &z_descriptor, oci_lob_class_entry_ptr, &data, &data_len, &type) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); if (php_oci_lob_write_tmp(descriptor, type, data, (int) data_len)) { @@ -1082,18 +1082,18 @@ PHP_FUNCTION(oci_lob_close) { zval *tmp, *z_descriptor = getThis(); php_oci_descriptor *descriptor; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_descriptor, oci_lob_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor); if (php_oci_lob_close(descriptor)) { @@ -1119,8 +1119,8 @@ PHP_FUNCTION(oci_new_descriptor) PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); /* php_oci_lob_create() checks type */ - descriptor = php_oci_lob_create(connection, type); - + descriptor = php_oci_lob_create(connection, type); + if (!descriptor) { RETURN_NULL(); } @@ -1170,7 +1170,7 @@ PHP_FUNCTION(oci_commit) if (connection->descriptors) { php_oci_connection_descriptors_free(connection); } - + if (php_oci_connection_commit(connection)) { RETURN_FALSE; } @@ -1245,7 +1245,7 @@ PHP_FUNCTION(oci_field_type) if (!column) { RETURN_FALSE; } - + switch (column->data_type) { #ifdef SQLT_TIMESTAMP case SQLT_TIMESTAMP: @@ -1460,7 +1460,7 @@ PHP_FUNCTION(oci_fetch_all) while (!php_oci_statement_fetch(statement, nrows)) { zval row; - + array_init_size(&row, statement->ncolumns); for (i = 0; i < statement->ncolumns; i++) { @@ -1491,11 +1491,11 @@ PHP_FUNCTION(oci_fetch_all) array_init_size(array, statement->ncolumns); columns = safe_emalloc(statement->ncolumns, sizeof(php_oci_out_column *), 0); outarrs = safe_emalloc(statement->ncolumns, sizeof(zval*), 0); - + if (flags & PHP_OCI_NUM) { for (i = 0; i < statement->ncolumns; i++) { columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0); - + array_init(&tmp); outarrs[ i ] = zend_hash_next_index_insert(Z_ARRVAL_P(array), &tmp); } @@ -1503,7 +1503,7 @@ PHP_FUNCTION(oci_fetch_all) for (i = 0; i < statement->ncolumns; i++) { zend_string *zvtmp; columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0); - + array_init(&tmp); zvtmp = zend_string_init(columns[ i ]->name, columns[ i ]->name_len, 0); outarrs[ i ] = zend_symtable_update(Z_ARRVAL_P(array), zvtmp, &tmp); @@ -1524,7 +1524,7 @@ PHP_FUNCTION(oci_fetch_all) break; } } - + efree(columns); efree(outarrs); } @@ -1605,7 +1605,7 @@ PHP_FUNCTION(oci_close) /* do nothing to keep BC */ return; } - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &z_connection) == FAILURE) { return; } @@ -1622,7 +1622,7 @@ PHP_FUNCTION(oci_close) } /* ZVAL_NULL(z_connection); */ - + RETURN_TRUE; } /* }}} */ @@ -2071,7 +2071,7 @@ PHP_FUNCTION(oci_new_cursor) PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); statement = php_oci_statement_create(connection, NULL, 0); - + if (statement) { RETURN_RES(statement->id); } @@ -2084,7 +2084,7 @@ PHP_FUNCTION(oci_new_cursor) PHP_FUNCTION(oci_result) { php_oci_out_column *column; - + column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); if(column) { php_oci_column_to_zval(column, return_value, 0); @@ -2124,7 +2124,7 @@ PHP_FUNCTION(oci_server_version) if (php_oci_server_get_version(connection, version, sizeof(version))) { RETURN_FALSE; } - + ret = zend_string_init(version, strlen(version), 0); RETURN_STR(ret); } @@ -2216,14 +2216,14 @@ PHP_FUNCTION(oci_free_collection) if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); zend_list_close(collection->id); @@ -2248,14 +2248,14 @@ PHP_FUNCTION(oci_collection_append) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &z_collection, oci_coll_class_entry_ptr, &value, &value_len) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_append(collection, value, (int) value_len)) { @@ -2282,20 +2282,20 @@ PHP_FUNCTION(oci_collection_element_get) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_collection, oci_coll_class_entry_ptr, &element_index) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_element_get(collection, element_index, &value)) { RETURN_FALSE; } - + RETURN_ZVAL(&value, 1, 1); } /* }}} */ @@ -2315,9 +2315,9 @@ PHP_FUNCTION(oci_collection_assign) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &z_collection_dest, oci_coll_class_entry_ptr, &z_collection_from, oci_coll_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_collection_dest), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property. The first argument should be valid collection object"); RETURN_FALSE; @@ -2356,14 +2356,14 @@ PHP_FUNCTION(oci_collection_element_assign) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ols", &z_collection, oci_coll_class_entry_ptr, &element_index, &value, &value_len) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_element_set(collection, element_index, value, (int) value_len)) { @@ -2380,18 +2380,18 @@ PHP_FUNCTION(oci_collection_size) zval *tmp, *z_collection = getThis(); php_oci_collection *collection; sb4 size = 0; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_size(collection, &size)) { @@ -2408,18 +2408,18 @@ PHP_FUNCTION(oci_collection_max) zval *tmp, *z_collection = getThis(); php_oci_collection *collection; zend_long max; - + if (!getThis()) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &z_collection, oci_coll_class_entry_ptr) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_max(collection, &max)) { @@ -2445,20 +2445,20 @@ PHP_FUNCTION(oci_collection_trim) else { if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &z_collection, oci_coll_class_entry_ptr, &trim_size) == FAILURE) { return; - } + } } - + if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } - + PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection); if (php_oci_collection_trim(collection, trim_size)) { RETURN_FALSE; } - RETURN_TRUE; + RETURN_TRUE; } /* }}} */ @@ -2471,13 +2471,13 @@ PHP_FUNCTION(oci_new_collection) php_oci_collection *collection; char *tdo, *schema = NULL; size_t tdo_len, schema_len = 0; - + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rs|s", &z_connection, &tdo, &tdo_len, &schema, &schema_len) == FAILURE) { return; } - + PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection); - + if ( (collection = php_oci_collection_create(connection, tdo, (int) tdo_len, schema, (int) schema_len)) ) { object_init_ex(return_value, oci_coll_class_entry_ptr); add_property_resource(return_value, "collection", collection->id); diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 3dce6d1cd3..f80aeae787 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -81,7 +81,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon } PHP_OCI_REGISTER_RESOURCE(descriptor, le_descriptor); - + descriptor->lob_current_position = 0; descriptor->lob_size = -1; /* we should set it to -1 to know, that it's just not initialized */ descriptor->buffering = PHP_OCI_LOB_BUFFER_DISABLED; /* buffering is off by default */ @@ -97,7 +97,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon zend_hash_init(connection->descriptors, 0, NULL, php_oci_descriptor_flush_hash_dtor, 0); connection->descriptor_count = 0; } - + descriptor->index = (connection->descriptor_count)++; if (connection->descriptor_count == LONG_MAX) { php_error_docref(NULL, E_WARNING, "Internal descriptor counter has reached limit"); @@ -120,7 +120,7 @@ int php_oci_lob_get_length (php_oci_descriptor *descriptor, ub4 *length) sword errstatus; *length = 0; - + if (descriptor->lob_size >= 0) { *length = descriptor->lob_size; return 0; @@ -133,7 +133,7 @@ int php_oci_lob_get_length (php_oci_descriptor *descriptor, ub4 *length) return 1; } } - + PHP_OCI_CALL_RETURN(errstatus, OCILobGetLength, (connection->svc, connection->err, descriptor->descriptor, (ub4 *)length)); if (errstatus != OCI_SUCCESS) { @@ -156,7 +156,7 @@ int php_oci_lob_get_length (php_oci_descriptor *descriptor, ub4 *length) connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ } - return 0; + return 0; } /* }}} */ @@ -226,7 +226,7 @@ static inline int php_oci_lob_calculate_buffer(php_oci_descriptor *descriptor, z descriptor->chunk_size = chunk_size; connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ } - + if ((read_length % descriptor->chunk_size) != 0) { return (int) descriptor->chunk_size * (((int) read_length / descriptor->chunk_size) + 1); } @@ -264,24 +264,24 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen if (length <= 0) { return 0; } - + if (initial_offset > length) { php_error_docref(NULL, E_WARNING, "Offset must be less than size of the LOB"); return 1; } - + if (read_length == -1) { requested_len = length; } - + if ((ub4) requested_len > (length - (ub4) initial_offset)) { requested_len = length - initial_offset; } - + if (requested_len <= 0) { return 0; } - + offset = initial_offset; if (descriptor->type == OCI_DTYPE_FILE) { @@ -352,15 +352,15 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen (ub1) descriptor->charset_form /* The character set form of the buffer data. */ ) ); - + efree(bufp); - + if (is_clob) { offset = descriptor->lob_current_position + chars_read; } else { offset = descriptor->lob_current_position + bytes_read; } - + if (errstatus != OCI_SUCCESS) { connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); @@ -371,7 +371,7 @@ int php_oci_lob_read (php_oci_descriptor *descriptor, zend_long read_length, zen *data_len = 0; return 1; } - + descriptor->lob_current_position = (int)offset; if (descriptor->type == OCI_DTYPE_FILE) { @@ -402,20 +402,20 @@ int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data, i php_oci_connection *connection = (php_oci_connection *) descriptor->connection; ub4 lob_length; sword errstatus; - + *bytes_written = 0; if (php_oci_lob_get_length(descriptor, &lob_length)) { return 1; } - + if (!data || data_len <= 0) { return 0; } - + if (offset > descriptor->lob_current_position) { offset = descriptor->lob_current_position; } - + PHP_OCI_CALL_RETURN(errstatus, OCILobWrite, ( connection->svc, @@ -441,16 +441,16 @@ int php_oci_lob_write (php_oci_descriptor *descriptor, ub4 offset, char *data, i } *bytes_written = data_len; descriptor->lob_current_position += data_len; - + if ((int) descriptor->lob_current_position > (int) descriptor->lob_size) { descriptor->lob_size = descriptor->lob_current_position; } - + /* marking buffer as used */ if (descriptor->buffering == PHP_OCI_LOB_BUFFER_ENABLED) { descriptor->buffering = PHP_OCI_LOB_BUFFER_USED; } - + connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; } @@ -467,12 +467,12 @@ int php_oci_lob_set_buffering (php_oci_descriptor *descriptor, int on_off) /* disabling when it's already off */ return 0; } - + if (on_off && descriptor->buffering != PHP_OCI_LOB_BUFFER_DISABLED) { /* enabling when it's already on */ return 0; } - + if (on_off) { PHP_OCI_CALL_RETURN(errstatus, OCILobEnableBuffering, (connection->svc, connection->err, descriptor->descriptor)); } else { @@ -509,11 +509,11 @@ int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor *d php_oci_connection *connection = descriptor_dest->connection; ub4 length_dest, length_from, copy_len; sword errstatus; - + if (php_oci_lob_get_length(descriptor_dest, &length_dest)) { return 1; } - + if (php_oci_lob_get_length(descriptor_from, &length_from)) { return 1; } @@ -546,7 +546,7 @@ int php_oci_lob_copy (php_oci_descriptor *descriptor_dest, php_oci_descriptor *d PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; } @@ -573,7 +573,7 @@ int php_oci_lob_close (php_oci_descriptor *descriptor) if (php_oci_temp_lob_close(descriptor)) { return 1; } - + return 0; } /* }}} */ @@ -587,16 +587,16 @@ int php_oci_temp_lob_close (php_oci_descriptor *descriptor) sword errstatus; PHP_OCI_CALL_RETURN(errstatus, OCILobIsTemporary, (connection->env,connection->err, descriptor->descriptor, &is_temporary)); - + if (errstatus != OCI_SUCCESS) { connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + if (is_temporary) { PHP_OCI_CALL_RETURN(errstatus, OCILobFreeTemporary, (connection->svc, connection->err, descriptor->descriptor)); - + if (errstatus != OCI_SUCCESS) { connection->errcode = php_oci_error(connection->err, errstatus); PHP_OCI_HANDLE_ERROR(connection, connection->errcode); @@ -630,7 +630,7 @@ int php_oci_lob_flush(php_oci_descriptor *descriptor, zend_long flush_flag) return 1; break; } - + /* do not really flush buffer, but report success * to suppress OCI error when flushing not used buffer * */ @@ -683,7 +683,7 @@ void php_oci_lob_free (php_oci_descriptor *descriptor) } } } - + /* flushing Lobs & Files with buffering enabled */ if ((descriptor->type == OCI_DTYPE_FILE || descriptor->type == OCI_DTYPE_LOB) && descriptor->buffering == PHP_OCI_LOB_BUFFER_USED) { php_oci_lob_flush(descriptor, OCI_LOB_BUFFER_FREE); @@ -711,17 +711,17 @@ int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename) char buf[8192]; ub4 offset = 1; sword errstatus; - + if (php_check_open_basedir(filename)) { return 1; } - + if ((fp = VCWD_OPEN(filename, O_RDONLY|O_BINARY)) == -1) { php_error_docref(NULL, E_WARNING, "Can't open file %s", filename); return 1; } - while ((loblen = read(fp, &buf, sizeof(buf))) > 0) { + while ((loblen = read(fp, &buf, sizeof(buf))) > 0) { PHP_OCI_CALL_RETURN(errstatus, OCILobWrite, ( @@ -751,7 +751,7 @@ int php_oci_lob_import (php_oci_descriptor *descriptor, char *filename) offset += loblen; } close(fp); - + return 0; } /* }}} */ @@ -769,7 +769,7 @@ int php_oci_lob_append (php_oci_descriptor *descriptor_dest, php_oci_descriptor if (php_oci_lob_get_length(descriptor_dest, &dest_len)) { return 1; } - + if (php_oci_lob_get_length(descriptor_from, &from_len)) { return 1; } @@ -798,11 +798,11 @@ int php_oci_lob_truncate (php_oci_descriptor *descriptor, zend_long new_lob_leng OCILobLocator *lob = descriptor->descriptor; ub4 lob_length; sword errstatus; - + if (php_oci_lob_get_length(descriptor, &lob_length)) { return 1; } - + if (lob_length <= 0) { return 0; } @@ -816,7 +816,7 @@ int php_oci_lob_truncate (php_oci_descriptor *descriptor, zend_long new_lob_leng php_error_docref(NULL, E_WARNING, "Size must be less than or equal to the current LOB size"); return 1; } - + PHP_OCI_CALL_RETURN(errstatus, OCILobTrim, (connection->svc, connection->err, lob, (ub4) new_lob_length)); if (errstatus != OCI_SUCCESS) { @@ -824,7 +824,7 @@ int php_oci_lob_truncate (php_oci_descriptor *descriptor, zend_long new_lob_leng PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + descriptor->lob_size = (ub4) new_lob_length; connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ @@ -842,11 +842,11 @@ int php_oci_lob_erase (php_oci_descriptor *descriptor, zend_long offset, ub4 len sword errstatus; *bytes_erased = 0; - + if (php_oci_lob_get_length(descriptor, &lob_length)) { return 1; } - + if (offset == -1) { offset = descriptor->lob_current_position; } @@ -854,7 +854,7 @@ int php_oci_lob_erase (php_oci_descriptor *descriptor, zend_long offset, ub4 len if (length == -1) { length = lob_length; } - + PHP_OCI_CALL_RETURN(errstatus, OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, (ub4) offset+1)); if (errstatus != OCI_SUCCESS) { @@ -862,7 +862,7 @@ int php_oci_lob_erase (php_oci_descriptor *descriptor, zend_long offset, ub4 len PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return 1; } - + *bytes_erased = length; connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; @@ -898,7 +898,7 @@ int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, zend_long type, char OCILobLocator *lob = descriptor->descriptor; ub4 bytes_written = 0; sword errstatus; - + switch (type) { case OCI_TEMP_BLOB: case OCI_TEMP_CLOB: diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 97aa51b077..a0635fb7e6 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -60,9 +60,9 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char /* do not allocate stmt handle for refcursors, we'll get it from OCIStmtPrepare2() */ PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->stmt), OCI_HTYPE_STMT, 0, NULL)); } - + PHP_OCI_CALL(OCIHandleAlloc, (connection->env, (dvoid **)&(statement->err), OCI_HTYPE_ERROR, 0, NULL)); - + if (query_len > 0) { PHP_OCI_CALL_RETURN(errstatus, OCIStmtPrepare2, ( @@ -93,7 +93,7 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char return NULL; } } - + if (query && query_len) { statement->last_query = ecalloc(1, query_len + 1); memcpy(statement->last_query, query, query_len); @@ -118,11 +118,11 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char } else { php_oci_statement_set_prefetch(statement, (ub4)100); /* semi-arbitrary, "sensible default" */ } - + PHP_OCI_REGISTER_RESOURCE(statement, le_statement); OCI_G(num_statements)++; - + return statement; } /* }}} */ @@ -153,7 +153,7 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement) statement2 = ecalloc(1,sizeof(php_oci_statement)); PHP_OCI_CALL(OCIHandleAlloc, (statement->connection->env, (dvoid **)&(statement2->err), OCI_HTYPE_ERROR, 0, NULL)); - statement2->stmt = (OCIStmt *)result; + statement2->stmt = (OCIStmt *)result; statement2->parent_stmtid = statement->id; statement2->impres_child_stmt = NULL; statement2->impres_count = 0; @@ -175,11 +175,11 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement) GC_REFCOUNT(statement2->connection->id)++; php_oci_statement_set_prefetch(statement2, statement->prefetch_count); - + PHP_OCI_REGISTER_RESOURCE(statement2, le_statement); - + OCI_G(num_statements)++; - + return statement2; } #endif /* OCI_MAJOR_VERSION < 12 */ @@ -197,7 +197,7 @@ int php_oci_statement_set_prefetch(php_oci_statement *statement, ub4 prefetch ) } PHP_OCI_CALL_RETURN(errstatus, OCIAttrSet, (statement->stmt, OCI_HTYPE_STMT, &prefetch, 0, OCI_ATTR_PREFETCH_ROWS, statement->err)); - + if (errstatus != OCI_SUCCESS) { statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); @@ -293,7 +293,7 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) piecewisecols = 1; } } - + while (errstatus == OCI_NEED_DATA) { if (piecewisecols) { PHP_OCI_CALL_RETURN(errstatus, @@ -359,11 +359,11 @@ int php_oci_statement_fetch(php_oci_statement *statement, ub4 nrows) if (column == NULL) { continue; } - + if (!column->define) { continue; } - + ZEND_ASSERT(Z_ISREF(column->define->val)); zval_ptr_dtor(Z_REFVAL(column->define->val)); ZVAL_NULL(Z_REFVAL(column->define->val)); @@ -419,11 +419,11 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf php_oci_out_column *outcol = (php_oci_out_column *)ctx; if (!outcol) { - + php_error_docref(NULL, E_WARNING, "Invalid context pointer value"); return OCI_ERROR; } - + switch(outcol->data_type) { case SQLT_RSET: { php_oci_statement *nested_stmt; @@ -466,7 +466,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf } outcol->descid = descr->id; descr->charset_form = outcol->charset_form; - + *bufpp = descr->descriptor; *alenpp = &(outcol->retlen4); *piecep = OCI_ONE_PIECE; @@ -512,7 +512,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) return 1; break; } - + if (!statement->stmttype) { /* get statement type */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement->stmttype, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); @@ -531,7 +531,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) } else { iters = 1; } - + if (statement->last_query) { /* Don't execute REFCURSORS or Implicit Result Set handles */ if (statement->binds) { @@ -550,7 +550,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } - + if (statement->binds) { zend_hash_apply(statement->binds, php_oci_bind_post_exec); } @@ -575,15 +575,15 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) if (statement->stmttype == OCI_STMT_SELECT && statement->executed == 0) { /* we only need to do the define step is this very statement is executed the first time! */ statement->executed = 1; - + ALLOC_HASHTABLE(statement->columns); zend_hash_init(statement->columns, 13, NULL, php_oci_column_hash_dtor, 0); - + counter = 1; /* get number of columns */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *)&colcount, (ub4 *)0, OCI_ATTR_PARAM_COUNT, statement->err)); - + if (errstatus != OCI_SUCCESS) { statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); @@ -591,19 +591,19 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) } statement->ncolumns = colcount; - + for (counter = 1; counter <= colcount; counter++) { outcol = (php_oci_out_column *) ecalloc(1, sizeof(php_oci_out_column)); - + if ((outcol = zend_hash_index_update_ptr(statement->columns, counter, outcol)) == NULL) { FREE_HASHTABLE(statement->columns); /* out of memory */ return 1; } - + /* get column */ PHP_OCI_CALL_RETURN(errstatus, OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)¶m, counter)); - + if (errstatus != OCI_SUCCESS) { statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); @@ -629,7 +629,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } - + /* get character set id */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->charset_id, (ub4 *)0, OCI_ATTR_CHARSET_ID, statement->err)); @@ -639,10 +639,10 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } - + /* get size of the column */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->data_size, (dvoid *)0, OCI_ATTR_DATA_SIZE, statement->err)); - + if (errstatus != OCI_SUCCESS) { PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); statement->errcode = php_oci_error(statement->err, errstatus); @@ -655,7 +655,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) /* get scale of the column */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->scale, (dvoid *)0, OCI_ATTR_SCALE, statement->err)); - + if (errstatus != OCI_SUCCESS) { PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); statement->errcode = php_oci_error(statement->err, errstatus); @@ -665,17 +665,17 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) /* get precision of the column */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid *)&outcol->precision, (dvoid *)0, OCI_ATTR_PRECISION, statement->err)); - + if (errstatus != OCI_SUCCESS) { PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } - + /* get name of the column */ PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)param, OCI_DTYPE_PARAM, (dvoid **)&colname, (ub4 *)&outcol->name_len, (ub4)OCI_ATTR_NAME, statement->err)); - + if (errstatus != OCI_SUCCESS) { PHP_OCI_CALL(OCIDescriptorFree, (param, OCI_DTYPE_PARAM)); statement->errcode = php_oci_error(statement->err, errstatus); @@ -766,9 +766,9 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) } else { outcol->storage_size4++; /* add one for string terminator */ } - + outcol->storage_size4 *= 3; - + dynamic = OCI_DEFAULT; buf = outcol->data = (text *) safe_emalloc(1, outcol->storage_size4, 0); memset(buf, 0, outcol->storage_size4); @@ -812,7 +812,7 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode) ); } - + if (errstatus != OCI_SUCCESS) { statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); @@ -902,7 +902,7 @@ void php_oci_statement_free(php_oci_statement *statement) zend_list_delete(statement->connection->id); efree(statement); - + OCI_G(num_statements)--; } /* }}} */ @@ -923,7 +923,7 @@ int php_oci_bind_pre_exec(zval *data, void *result) * bind->indicator are not used for oci_bind_array_by_name. */ return 0; - } + } switch (bind->type) { case SQLT_NTY: case SQLT_BFILEE: @@ -936,7 +936,7 @@ int php_oci_bind_pre_exec(zval *data, void *result) *(int *)result = 1; } break; - + case SQLT_CHR: case SQLT_AFC: case SQLT_INT: @@ -1036,7 +1036,7 @@ int php_oci_bind_post_exec(zval *data) ub4 buff_len = 1024; memset((void*)buff,0,sizeof(buff)); - + if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { PHP_OCI_CALL_RETURN(errstatus, OCIDateToText, (connection->err, &(((OCIDate *)(bind->array.elements))[i]), 0, 0, 0, 0, &buff_len, buff)); zval_ptr_dtor(entry); @@ -1063,7 +1063,7 @@ int php_oci_bind_post_exec(zval *data) } } break; - + case SQLT_AFC: case SQLT_CHR: case SQLT_VCS: @@ -1119,7 +1119,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l case SQLT_NTY: { zval *tmp; - + if (Z_TYPE_P(param) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(param), "collection", sizeof("collection")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); return 1; @@ -1128,7 +1128,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l PHP_OCI_ZVAL_TO_COLLECTION_EX(tmp, bind_collection); value_sz = sizeof(void*); mode = OCI_DEFAULT; - + if (!bind_collection->collection) { return 1; } @@ -1141,7 +1141,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l case SQLT_RDD: { zval *tmp; - + if (Z_TYPE_P(param) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(param), "descriptor", sizeof("descriptor")-1)) == NULL) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); return 1; @@ -1150,15 +1150,15 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l PHP_OCI_ZVAL_TO_DESCRIPTOR_EX(tmp, bind_descriptor); value_sz = sizeof(void*); - + oci_desc = bind_descriptor->descriptor; - + if (!oci_desc) { return 1; } } break; - + case SQLT_INT: case SQLT_NUM: if (Z_TYPE_P(param) == IS_RESOURCE || Z_TYPE_P(param) == IS_OBJECT) { @@ -1170,7 +1170,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l value_sz = sizeof(oci_phpsized_int); mode = OCI_DEFAULT; break; - + case SQLT_LBI: case SQLT_BIN: case SQLT_LNG: @@ -1265,7 +1265,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l */ if (value_sz == 0) value_sz = 1; - + bindp->descriptor = oci_desc; bindp->statement = oci_stmt; bindp->parent_statement = statement; @@ -1283,7 +1283,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l statement->stmt, /* statement handle */ (OCIBind **)&bindp->bind, /* bind hdl (will alloc) */ statement->err, /* error handle */ - (text*) name, /* placeholder name */ + (text*) name, /* placeholder name */ (sb4) name_len, /* placeholder length */ (dvoid *)bind_data, /* in/out data */ value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */ @@ -1335,14 +1335,14 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l (ub4 *) 0 ) ); - + if (errstatus) { statement->errcode = php_oci_error(statement->err, errstatus); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } } - + statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */ return 0; } @@ -1484,7 +1484,7 @@ sb4 php_oci_bind_out_callback( Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(val) + 1); /* XXX is this right? */ ZVAL_STRINGL(val, NULL, Z_STRLEN(val) + 1); -#endif +#endif /* XXX we assume that zend-zval len has 4 bytes */ *alenpp = (ub4*) &Z_STRLEN_P(val); @@ -1520,7 +1520,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME if (need_data && !statement->has_data) { return NULL; } - + if (Z_TYPE_P(column_index) == IS_STRING) { column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), (int) Z_STRLEN_P(column_index)); if (!column) { @@ -1551,9 +1551,9 @@ int php_oci_statement_get_type(php_oci_statement *statement, ub2 *type) { ub2 statement_type; sword errstatus; - + *type = 0; - + PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)&statement_type, (ub4 *)0, OCI_ATTR_STMT_TYPE, statement->err)); if (errstatus != OCI_SUCCESS) { @@ -1574,9 +1574,9 @@ int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows) { ub4 statement_numrows; sword errstatus; - + *numrows = 0; - + PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub4 *)&statement_numrows, (ub4 *)0, OCI_ATTR_ROW_COUNT, statement->err)); if (errstatus != OCI_SUCCESS) { @@ -1609,7 +1609,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength); return 1; } - + switch(type) { case SQLT_NUM: case SQLT_INT: @@ -1620,7 +1620,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t case SQLT_FLT: bind = php_oci_bind_array_helper_double(val, max_table_length); break; - + case SQLT_AFC: case SQLT_CHR: case SQLT_VCS: @@ -1646,7 +1646,7 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t /* failed to generate bind struct */ return 1; } - + bind->descriptor = NULL; bind->statement = NULL; bind->parent_statement = statement; @@ -1675,8 +1675,8 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t (ub4) OCI_DEFAULT ) ); - - + + if (errstatus != OCI_SUCCESS) { if (bind->array.elements) { efree(bind->array.elements); @@ -1737,7 +1737,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le zend_hash_move_forward(hash); } } - + bind = emalloc(sizeof(php_oci_bind)); ZVAL_UNDEF(&bind->val); bind->array.elements = (text *)safe_emalloc(max_table_length * (maxlength + 1), sizeof(text), 0); @@ -1749,9 +1749,9 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le memset(bind->array.element_lengths, 0, max_table_length*sizeof(ub2)); bind->array.indicators = safe_emalloc(max_table_length, sizeof(sb2), 0); memset(bind->array.indicators, 0, max_table_length*sizeof(sb2)); - + zend_hash_internal_pointer_reset(hash); - + for (i = 0; i < bind->array.current_length; i++) { if ((entry = zend_hash_get_current_data(hash)) != NULL) { convert_to_string_ex(entry); @@ -1769,13 +1769,13 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_le for (i = 0; i < max_table_length; i++) { if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { int element_length; - + convert_to_string_ex(entry); element_length = ((size_t) maxlength > Z_STRLEN_P(entry)) ? (int) Z_STRLEN_P(entry) : (int) maxlength; - + memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_P(entry), element_length); ((text *)bind->array.elements)[i*maxlength + element_length] = '\0'; - + zend_hash_move_forward(hash); } else { ((text *)bind->array.elements)[i*maxlength] = '\0'; @@ -1808,7 +1808,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_le bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); bind->array.indicators = NULL; - + zend_hash_internal_pointer_reset(hash); for (i = 0; i < max_table_length; i++) { if (i < bind->array.current_length) { @@ -1849,7 +1849,7 @@ php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_le bind->array.element_lengths = safe_emalloc(max_table_length, sizeof(ub2), 0); memset(bind->array.element_lengths, 0, max_table_length * sizeof(ub2)); bind->array.indicators = NULL; - + zend_hash_internal_pointer_reset(hash); for (i = 0; i < max_table_length; i++) { if (i < bind->array.current_length) { @@ -1899,7 +1899,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng bind->array.element_lengths[i] = sizeof(OCIDate); } if ((i < bind->array.current_length) && (entry = zend_hash_get_current_data(hash)) != NULL) { - + convert_to_string_ex(entry); PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_P(entry), (ub4) Z_STRLEN_P(entry), NULL, 0, NULL, 0, &oci_date)); @@ -1912,7 +1912,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return NULL; } - + ((OCIDate *)bind->array.elements)[i] = oci_date; zend_hash_move_forward(hash); } else { @@ -1927,7 +1927,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, zend_long max_table_leng PHP_OCI_HANDLE_ERROR(connection, connection->errcode); return NULL; } - + ((OCIDate *)bind->array.elements)[i] = oci_date; } connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */ diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt index f1bee56b84..15a8647779 100644 --- a/ext/oci8/tests/array_bind_001.phpt +++ b/ext/oci8/tests/array_bind_001.phpt @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): OCI-21560: argument 3 is null, invalid, or out of range in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_002.phpt b/ext/oci8/tests/array_bind_002.phpt index f70ebb3f61..2bf39b5865 100644 --- a/ext/oci8/tests/array_bind_002.phpt +++ b/ext/oci8/tests/array_bind_002.phpt @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Maximum array length must be greater than zero in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index 0de8e68187..0979f4340f 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-01403: %s ORA-06512: at "%s.ARRAY_BIND_003_PKG", line %d ORA-06512: at line %d in %sarray_bind_003.php on line %d diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 297229cab8..d9dfb01548 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-01403: %s ORA-06512: at "%s.ARRAY_BIND_004_PKG", line %d ORA-06512: at line %d in %sarray_bind_004.php on line %d diff --git a/ext/oci8/tests/array_bind_005.phpt b/ext/oci8/tests/array_bind_005.phpt index 31d368d661..b9a8b8c820 100644 --- a/ext/oci8/tests/array_bind_005.phpt +++ b/ext/oci8/tests/array_bind_005.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(0) "" diff --git a/ext/oci8/tests/array_bind_006.phpt b/ext/oci8/tests/array_bind_006.phpt index f2239f9d19..56db1aea61 100644 --- a/ext/oci8/tests/array_bind_006.phpt +++ b/ext/oci8/tests/array_bind_006.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/array_bind_007.phpt b/ext/oci8/tests/array_bind_007.phpt index a3c63bca86..7cde333aad 100644 --- a/ext/oci8/tests/array_bind_007.phpt +++ b/ext/oci8/tests/array_bind_007.phpt @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: -1 in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_008.phpt b/ext/oci8/tests/array_bind_008.phpt index 512ce05374..5b1975cd18 100644 --- a/ext/oci8/tests/array_bind_008.phpt +++ b/ext/oci8/tests/array_bind_008.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-06550: line %d, column %d: PLS-00418: %s ORA-06550: %s diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt index 8e83b0982c..64b2e8cded 100644 --- a/ext/oci8/tests/array_bind_009.phpt +++ b/ext/oci8/tests/array_bind_009.phpt @@ -11,7 +11,7 @@ var_dump(oci_bind_array_by_name($c, ":c1", $array, 5, 5, SQLT_CHR)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): supplied resource is not a valid oci8 statement resource in %s on line %d bool(false) Done diff --git a/ext/oci8/tests/array_bind_010.phpt b/ext/oci8/tests/array_bind_010.phpt index ede82c97fc..b5ba85938c 100644 --- a/ext/oci8/tests/array_bind_010.phpt +++ b/ext/oci8/tests/array_bind_010.phpt @@ -19,7 +19,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): ORA-01036: illegal variable name/number in %s on line %d array(5) { [0]=> diff --git a/ext/oci8/tests/array_bind_011.phpt b/ext/oci8/tests/array_bind_011.phpt index 90631619bc..164821c221 100644 --- a/ext/oci8/tests/array_bind_011.phpt +++ b/ext/oci8/tests/array_bind_011.phpt @@ -58,7 +58,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): You must provide max length value for empty arrays in %s on line %d Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d diff --git a/ext/oci8/tests/array_bind_012.phpt b/ext/oci8/tests/array_bind_012.phpt index 38e1701a4b..e2b74a9ce9 100644 --- a/ext/oci8/tests/array_bind_012.phpt +++ b/ext/oci8/tests/array_bind_012.phpt @@ -19,7 +19,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name(): Invalid max length value (-10) in %s on line %d array(0) { } diff --git a/ext/oci8/tests/array_bind_013.phpt b/ext/oci8/tests/array_bind_013.phpt index 4da9d8bbed..44d4bd1e6d 100644 --- a/ext/oci8/tests/array_bind_013.phpt +++ b/ext/oci8/tests/array_bind_013.phpt @@ -22,7 +22,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_bind_array_by_name() expects at most 6 parameters, 7 given in %s on line %d NULL diff --git a/ext/oci8/tests/array_bind_014.phpt b/ext/oci8/tests/array_bind_014.phpt index 8a88aff33b..51224bc3e0 100644 --- a/ext/oci8/tests/array_bind_014.phpt +++ b/ext/oci8/tests/array_bind_014.phpt @@ -60,7 +60,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_date.phpt b/ext/oci8/tests/array_bind_date.phpt index cc48779fd1..75d2dbb3ba 100644 --- a/ext/oci8/tests/array_bind_date.phpt +++ b/ext/oci8/tests/array_bind_date.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(9) "05-NOV-05" diff --git a/ext/oci8/tests/array_bind_date1.phpt b/ext/oci8/tests/array_bind_date1.phpt index 8e1aceaa06..c0228539a1 100644 --- a/ext/oci8/tests/array_bind_date1.phpt +++ b/ext/oci8/tests/array_bind_date1.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(9) "05-NOV-05" diff --git a/ext/oci8/tests/array_bind_float.phpt b/ext/oci8/tests/array_bind_float.phpt index a7cc87bc68..dbd1437696 100644 --- a/ext/oci8/tests/array_bind_float.phpt +++ b/ext/oci8/tests/array_bind_float.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> float(5.9999) diff --git a/ext/oci8/tests/array_bind_float1.phpt b/ext/oci8/tests/array_bind_float1.phpt index 082262594b..c342c0eb58 100644 --- a/ext/oci8/tests/array_bind_float1.phpt +++ b/ext/oci8/tests/array_bind_float1.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> float(5.9999) diff --git a/ext/oci8/tests/array_bind_int.phpt b/ext/oci8/tests/array_bind_int.phpt index 0857477971..19fa3bf2ac 100644 --- a/ext/oci8/tests/array_bind_int.phpt +++ b/ext/oci8/tests/array_bind_int.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_int1.phpt b/ext/oci8/tests/array_bind_int1.phpt index 7a784bac61..b730cb2f20 100644 --- a/ext/oci8/tests/array_bind_int1.phpt +++ b/ext/oci8/tests/array_bind_int1.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> int(5) diff --git a/ext/oci8/tests/array_bind_str.phpt b/ext/oci8/tests/array_bind_str.phpt index bda452fd02..70c148afcf 100644 --- a/ext/oci8/tests/array_bind_str.phpt +++ b/ext/oci8/tests/array_bind_str.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/array_bind_str1.phpt b/ext/oci8/tests/array_bind_str1.phpt index 9444786cbe..aabed16d4f 100644 --- a/ext/oci8/tests/array_bind_str1.phpt +++ b/ext/oci8/tests/array_bind_str1.phpt @@ -61,7 +61,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(4) "five" diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 84ef14d957..477bb1422f 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -26,7 +26,7 @@ $stmtarray = array( "insert into bind_char_tab values (2, NULL, 'abc')", "insert into bind_char_tab values (3, NULL, 'abc ')" ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -196,7 +196,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt index 317a1db901..7a97213cad 100644 --- a/ext/oci8/tests/bind_char_1_11gR1.phpt +++ b/ext/oci8/tests/bind_char_1_11gR1.phpt @@ -28,7 +28,7 @@ $stmtarray = array( "insert into bind_char_tab values (2, NULL, 'abc')", "insert into bind_char_tab values (3, NULL, 'abc ')" ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -198,7 +198,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index 3f925e3bbd..5ab03553b7 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -25,7 +25,7 @@ $stmtarray = array( "create table bind_char_tab (id number, c1 date)", "insert into bind_char_tab values (1, '2008-04-20')", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -85,7 +85,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt index 2395b83b88..00831111b6 100644 --- a/ext/oci8/tests/bind_char_2_11gR1.phpt +++ b/ext/oci8/tests/bind_char_2_11gR1.phpt @@ -25,7 +25,7 @@ $stmtarray = array( "create table bind_char_tab (id number, c1 date)", "insert into bind_char_tab values (1, '2008-04-20')", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test @@ -85,7 +85,7 @@ function do_e_q($s) $stmtarray = array( "drop table bind_char_tab" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt index 4ab77c6a5c..3c3d3b36dc 100644 --- a/ext/oci8/tests/bind_char_3_11gR1.phpt +++ b/ext/oci8/tests/bind_char_3_11gR1.phpt @@ -22,7 +22,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 char) return char as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 0e380ec5f0..60d7ac6c9f 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -24,7 +24,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt index cc1276181d..9bc0ddf428 100644 --- a/ext/oci8/tests/bind_char_4_11gR1.phpt +++ b/ext/oci8/tests/bind_char_4_11gR1.phpt @@ -24,7 +24,7 @@ require(dirname(__FILE__).'/connect.inc'); $stmtarray = array( "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;", ); - + oci8_test_sql_execute($c, $stmtarray); // Run Test diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index 0b9d2b99e0..3058c1bcae 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/ext/oci8/tests/bug27303_1.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index d2018783bc..f7e224f45c 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -51,7 +51,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index ee2f7b52aa..76188153e5 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index a50b3e2613..0a0cc44845 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index e291067088..aafdf61e73 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -6,7 +6,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) ---EXPECT-- +--EXPECT-- int(1) int(2) int(3) diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index ed9d5a1fe6..a88f29807d 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -16,7 +16,7 @@ NLS_LANG= ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index 550d89fdcc..ff21d23a2a 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -14,7 +14,7 @@ if (!(isset($matches[0]) && $matches[1] < 12)) { ---EXPECT-- +--EXPECT-- string(1) "1" string(1) "2" string(1) "3" diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt index 906195c60f..925433659b 100644 --- a/ext/oci8/tests/bug32325.phpt +++ b/ext/oci8/tests/bug32325.phpt @@ -9,7 +9,7 @@ require(dirname(__FILE__).'/skipif.inc'); ---EXPECT-- +--EXPECT-- int(4) float(2) float(3) diff --git a/ext/oci8/tests/bug35973.phpt b/ext/oci8/tests/bug35973.phpt index 399391b8e9..4c000d022b 100644 --- a/ext/oci8/tests/bug35973.phpt +++ b/ext/oci8/tests/bug35973.phpt @@ -33,7 +33,7 @@ $s1 = oci_parse($c, "drop table test_nclob"); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(1) { ["NC"]=> object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt index ec382d27ba..cd68b66f34 100644 --- a/ext/oci8/tests/bug36010.phpt +++ b/ext/oci8/tests/bug36010.phpt @@ -7,7 +7,7 @@ require(dirname(__FILE__).'/skipif.inc'); ?> --FILE-- writetemporary("", OCI_TEMP_CLOB); $success = oci_execute($stmt, OCI_COMMIT_ON_SUCCESS); -oci_free_statement($stmt); +oci_free_statement($stmt); $clob->close(); // Query back the change diff --git a/ext/oci8/tests/bug37581.phpt b/ext/oci8/tests/bug37581.phpt index b9b491cac0..642414f9a3 100644 --- a/ext/oci8/tests/bug37581.phpt +++ b/ext/oci8/tests/bug37581.phpt @@ -44,7 +44,7 @@ var_dump($strings); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(1) "A" diff --git a/ext/oci8/tests/bug38161.phpt b/ext/oci8/tests/bug38161.phpt index 0664510146..4187de8fed 100644 --- a/ext/oci8/tests/bug38161.phpt +++ b/ext/oci8/tests/bug38161.phpt @@ -24,7 +24,7 @@ var_dump($bv); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- NULL int(0) Done diff --git a/ext/oci8/tests/bug40078.phpt b/ext/oci8/tests/bug40078.phpt index b7abcf5214..9fdcb14b7d 100644 --- a/ext/oci8/tests/bug40078.phpt +++ b/ext/oci8/tests/bug40078.phpt @@ -42,7 +42,7 @@ var_dump($array); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- array(5) { [0]=> string(3) "one" diff --git a/ext/oci8/tests/bug41069.phpt b/ext/oci8/tests/bug41069.phpt index 29f579448e..a7606819f3 100644 --- a/ext/oci8/tests/bug41069.phpt +++ b/ext/oci8/tests/bug41069.phpt @@ -51,7 +51,7 @@ $stmtarray = array( "insert into bug41069_tab (c1, c2, c3, c4, c5, c6, c7, c9, c10, c12, c15) values (113, 'aaaaaaa', 'bbbbbbbbbb', 'cccccc', 'e', 'f', 'dddd', '12/04/2006', '12/04/2006', 2224, 'zzzzzzz')" ); - + oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt index 6171127591..618836da58 100644 --- a/ext/oci8/tests/bug43497.phpt +++ b/ext/oci8/tests/bug43497.phpt @@ -102,27 +102,27 @@ function dropxmltab($c) // delete table function fillxmltab($c) { for ($id = 1; $id <= 100; $id++) { - - // create an XML element string with random data + + // create an XML element string with random data $s = ""; for ($j = 0; $j < 128; $j++) { - $s .= rand(); + $s .= rand(); } - $s .= "\n"; + $s .= "\n"; for ($j = 0; $j < 4; $j++) { $s .= $s; - } + } $data = "" . $s . ""; - + // insert XML data into database - + $stmt = oci_parse($c, "insert into bug43497_tab(id, xml) values (:id, sys.xmltype.createxml(:xml))"); oci_bind_by_name($stmt, ":id", $id); $clob = oci_new_descriptor($c, OCI_D_LOB); oci_bind_by_name($stmt, ":xml", $clob, -1, OCI_B_CLOB); $clob->writetemporary($data); oci_execute($stmt); - + $clob->close(); $clob->free(); } diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt index b25d393ee2..21a0cf8a3f 100644 --- a/ext/oci8/tests/bug51253.phpt +++ b/ext/oci8/tests/bug51253.phpt @@ -89,7 +89,7 @@ $statement = oci_parse($c, "DROP TABLE BIND_TEST"); echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- Test 1 array(5) { [0]=> diff --git a/ext/oci8/tests/bug71600.phpt b/ext/oci8/tests/bug71600.phpt index c49dd0ee03..fc548d26c1 100644 --- a/ext/oci8/tests/bug71600.phpt +++ b/ext/oci8/tests/bug71600.phpt @@ -9,7 +9,7 @@ require(dirname(__FILE__).'/skipif.inc'); ===DONE=== ---EXPECT-- +--EXPECT-- Test 1 Executing SELECT statament... Fetching data by columns... diff --git a/ext/oci8/tests/close.phpt b/ext/oci8/tests/close.phpt index aed90fcaa7..6f9d2b8473 100644 --- a/ext/oci8/tests/close.phpt +++ b/ext/oci8/tests/close.phpt @@ -10,8 +10,8 @@ require dirname(__FILE__).'/connect.inc'; oci_close($c); oci_connect($user, $password, $dbase); - + echo "Done\n"; ?> ---EXPECT-- +--EXPECT-- Done diff --git a/ext/oci8/tests/coll_009.phpt b/ext/oci8/tests/coll_009.phpt index 5f502036f3..bb3f6aed75 100644 --- a/ext/oci8/tests/coll_009.phpt +++ b/ext/oci8/tests/coll_009.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_009_func.phpt b/ext/oci8/tests/coll_009_func.phpt index 40d7e60228..38573bd3a8 100644 --- a/ext/oci8/tests/coll_009_func.phpt +++ b/ext/oci8/tests/coll_009_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_010.phpt b/ext/oci8/tests/coll_010.phpt index 11dbe61f70..620872c206 100644 --- a/ext/oci8/tests/coll_010.phpt +++ b/ext/oci8/tests/coll_010.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_010_func.phpt b/ext/oci8/tests/coll_010_func.phpt index f3284584d3..75a6c1209c 100644 --- a/ext/oci8/tests/coll_010_func.phpt +++ b/ext/oci8/tests/coll_010_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_011.phpt b/ext/oci8/tests/coll_011.phpt index da0650cfdd..220ed179a5 100644 --- a/ext/oci8/tests/coll_011.phpt +++ b/ext/oci8/tests/coll_011.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_011_func.phpt b/ext/oci8/tests/coll_011_func.phpt index 684da3d85d..ff121d7820 100644 --- a/ext/oci8/tests/coll_011_func.phpt +++ b/ext/oci8/tests/coll_011_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_012.phpt b/ext/oci8/tests/coll_012.phpt index 3d47ee8830..c99a5abb3a 100644 --- a/ext/oci8/tests/coll_012.phpt +++ b/ext/oci8/tests/coll_012.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_012_func.phpt b/ext/oci8/tests/coll_012_func.phpt index 0884144776..1a20b37bc1 100644 --- a/ext/oci8/tests/coll_012_func.phpt +++ b/ext/oci8/tests/coll_012_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_013.phpt b/ext/oci8/tests/coll_013.phpt index f85c98a907..2bb836ae1a 100644 --- a/ext/oci8/tests/coll_013.phpt +++ b/ext/oci8/tests/coll_013.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_013_func.phpt b/ext/oci8/tests/coll_013_func.phpt index 2132a06a0a..27c2e66868 100644 --- a/ext/oci8/tests/coll_013_func.phpt +++ b/ext/oci8/tests/coll_013_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF DATE"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_014.phpt b/ext/oci8/tests/coll_014.phpt index eca1c18ee4..de3d46bd29 100644 --- a/ext/oci8/tests/coll_014.phpt +++ b/ext/oci8/tests/coll_014.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_014_func.phpt b/ext/oci8/tests/coll_014_func.phpt index ad04ad0be7..4acde26e9e 100644 --- a/ext/oci8/tests/coll_014_func.phpt +++ b/ext/oci8/tests/coll_014_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_015.phpt b/ext/oci8/tests/coll_015.phpt index 3618af4f73..2d8a0f382b 100644 --- a/ext/oci8/tests/coll_015.phpt +++ b/ext/oci8/tests/coll_015.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_015_func.phpt b/ext/oci8/tests/coll_015_func.phpt index af82ff1285..d88b14547e 100644 --- a/ext/oci8/tests/coll_015_func.phpt +++ b/ext/oci8/tests/coll_015_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_016.phpt b/ext/oci8/tests/coll_016.phpt index 3f6dac744c..1ba78007cc 100644 --- a/ext/oci8/tests/coll_016.phpt +++ b/ext/oci8/tests/coll_016.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_016_func.phpt b/ext/oci8/tests/coll_016_func.phpt index 470ac1da73..ba3bee863a 100644 --- a/ext/oci8/tests/coll_016_func.phpt +++ b/ext/oci8/tests/coll_016_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF NUMBER"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_017.phpt b/ext/oci8/tests/coll_017.phpt index 7c07e3c61d..c988e4ffe6 100644 --- a/ext/oci8/tests/coll_017.phpt +++ b/ext/oci8/tests/coll_017.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/coll_017_func.phpt b/ext/oci8/tests/coll_017_func.phpt index a08a95f052..1aff12d764 100644 --- a/ext/oci8/tests/coll_017_func.phpt +++ b/ext/oci8/tests/coll_017_func.phpt @@ -18,7 +18,7 @@ $statement = OCIParse($c,$ora_sql); @OCIExecute($statement); $ora_sql = "CREATE TYPE ".$type_name." AS TABLE OF VARCHAR(10)"; - + $statement = OCIParse($c,$ora_sql); OCIExecute($statement); diff --git a/ext/oci8/tests/commit_001.phpt b/ext/oci8/tests/commit_001.phpt index 2df6b03382..2696217a0f 100644 --- a/ext/oci8/tests/commit_001.phpt +++ b/ext/oci8/tests/commit_001.phpt @@ -74,7 +74,7 @@ var_dump($all); require(dirname(__FILE__).'/drop_table.inc'); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/commit_old.phpt b/ext/oci8/tests/commit_old.phpt index dadffb6850..0e3e08112a 100644 --- a/ext/oci8/tests/commit_old.phpt +++ b/ext/oci8/tests/commit_old.phpt @@ -64,7 +64,7 @@ var_dump($all); require dirname(__FILE__).'/drop_table.inc'; - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index c44b70aeca..7897ddd4c9 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -62,7 +62,7 @@ foreach($values_array as $val ) { oci_set_module_name($c1,$val); oci_set_client_identifier($c1,$val); oci_set_client_info($c1,$val); - $r = oci_set_action($c1,$val); + $r = oci_set_action($c1,$val); if ($r) { echo "Values set successfully to $val\n"; foreach($attr_array as $attr) { diff --git a/ext/oci8/tests/connect.phpt b/ext/oci8/tests/connect.phpt index 6ce4c533ba..390ce1923e 100644 --- a/ext/oci8/tests/connect.phpt +++ b/ext/oci8/tests/connect.phpt @@ -13,7 +13,7 @@ if (!empty($dbase)) { else { var_dump(oci_connect($user, $password)); } - + echo "Done\n"; ?> diff --git a/ext/oci8/tests/connect_old.phpt b/ext/oci8/tests/connect_old.phpt index 55f1734a5a..390c418a11 100644 --- a/ext/oci8/tests/connect_old.phpt +++ b/ext/oci8/tests/connect_old.phpt @@ -13,7 +13,7 @@ if (!empty($dbase)) { else { var_dump(ocilogon($user, $password)); } - + echo "Done\n"; ?> diff --git a/ext/oci8/tests/connect_scope1.phpt b/ext/oci8/tests/connect_scope1.phpt index b1f6653f12..55cc171047 100644 --- a/ext/oci8/tests/connect_scope1.phpt +++ b/ext/oci8/tests/connect_scope1.phpt @@ -18,7 +18,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope2.phpt b/ext/oci8/tests/connect_scope2.phpt index 660630bb6b..76ed42ca17 100644 --- a/ext/oci8/tests/connect_scope2.phpt +++ b/ext/oci8/tests/connect_scope2.phpt @@ -18,7 +18,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try1.phpt b/ext/oci8/tests/connect_scope_try1.phpt index d30fc6686d..6dc94792db 100644 --- a/ext/oci8/tests/connect_scope_try1.phpt +++ b/ext/oci8/tests/connect_scope_try1.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try2.phpt b/ext/oci8/tests/connect_scope_try2.phpt index bb1ad4a7c6..47e2b384b4 100644 --- a/ext/oci8/tests/connect_scope_try2.phpt +++ b/ext/oci8/tests/connect_scope_try2.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try3.phpt b/ext/oci8/tests/connect_scope_try3.phpt index 4a82362127..6e1c652ad5 100644 --- a/ext/oci8/tests/connect_scope_try3.phpt +++ b/ext/oci8/tests/connect_scope_try3.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try4.phpt b/ext/oci8/tests/connect_scope_try4.phpt index 25a951a792..f35f4e68b5 100644 --- a/ext/oci8/tests/connect_scope_try4.phpt +++ b/ext/oci8/tests/connect_scope_try4.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try5.phpt b/ext/oci8/tests/connect_scope_try5.phpt index 0a2518d4e0..325ce2fb99 100644 --- a/ext/oci8/tests/connect_scope_try5.phpt +++ b/ext/oci8/tests/connect_scope_try5.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_scope_try6.phpt b/ext/oci8/tests/connect_scope_try6.phpt index 653bacc879..6cc54a21bb 100644 --- a/ext/oci8/tests/connect_scope_try6.phpt +++ b/ext/oci8/tests/connect_scope_try6.phpt @@ -20,7 +20,7 @@ if (!empty($dbase)) $c1 = oci_new_connect($user,$password,$dbase); else $c1 = oci_new_connect($user,$password); - + oci8_test_sql_execute($c1, $stmtarray); // Run Test diff --git a/ext/oci8/tests/connect_with_charset_001.phpt b/ext/oci8/tests/connect_with_charset_001.phpt index 9149747cdb..36963ab5a0 100644 --- a/ext/oci8/tests/connect_with_charset_001.phpt +++ b/ext/oci8/tests/connect_with_charset_001.phpt @@ -21,7 +21,7 @@ var_dump($c5 == $c6); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- resource(%d) of type (oci8 connection) resource(%d) of type (oci8 connection) diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt index 4ccc2989c8..0e4a37ca3a 100644 --- a/ext/oci8/tests/connect_without_oracle_home.phpt +++ b/ext/oci8/tests/connect_without_oracle_home.phpt @@ -28,7 +28,7 @@ if (!empty($dbase)) { else { var_dump(oci_connect($user, $password)); } - + ?> ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_11.phpt b/ext/oci8/tests/connect_without_oracle_home_11.phpt index 9962ecfcf8..09f778362c 100644 --- a/ext/oci8/tests/connect_without_oracle_home_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_11.phpt @@ -31,7 +31,7 @@ if (!empty($dbase)) { else { var_dump(oci_connect($user, $password)); } - + ?> ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_old.phpt b/ext/oci8/tests/connect_without_oracle_home_old.phpt index 7e15bc5dd4..1bc7b37c23 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old.phpt @@ -24,7 +24,7 @@ if (!empty($dbase)) { else { var_dump(ocilogon($user, $password)); } - + ?> ===DONE=== diff --git a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt index 6371b3f909..07803b9996 100644 --- a/ext/oci8/tests/connect_without_oracle_home_old_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_old_11.phpt @@ -31,7 +31,7 @@ if (!empty($dbase)) { else { var_dump(ocilogon($user, $password)); } - + ?> ===DONE=== diff --git a/ext/oci8/tests/debug.phpt b/ext/oci8/tests/debug.phpt index 66ab0f0d00..729726fdd6 100644 --- a/ext/oci8/tests/debug.phpt +++ b/ext/oci8/tests/debug.phpt @@ -15,7 +15,7 @@ if (!empty($dbase)) { else { oci_connect($user, $password); } - + oci_internal_debug(false); ?> diff --git a/ext/oci8/tests/default_prefetch.phpt b/ext/oci8/tests/default_prefetch.phpt index cc70c6ecb3..5d2934e4cb 100644 --- a/ext/oci8/tests/default_prefetch.phpt +++ b/ext/oci8/tests/default_prefetch.phpt @@ -44,7 +44,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/default_prefetch0.phpt b/ext/oci8/tests/default_prefetch0.phpt index cc70c6ecb3..5d2934e4cb 100644 --- a/ext/oci8/tests/default_prefetch0.phpt +++ b/ext/oci8/tests/default_prefetch0.phpt @@ -44,7 +44,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt index bc78829365..04fbd1a5a5 100644 --- a/ext/oci8/tests/default_prefetch1.phpt +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -44,7 +44,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt index d8a76dbb07..33e91150b6 100644 --- a/ext/oci8/tests/default_prefetch2.phpt +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -45,7 +45,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/define2.phpt b/ext/oci8/tests/define2.phpt index 086cc7275c..67cff225c1 100644 --- a/ext/oci8/tests/define2.phpt +++ b/ext/oci8/tests/define2.phpt @@ -14,7 +14,7 @@ $stmtarray = array( "drop table phptestrawtable", "create table phptestrawtable( id number(10), fileimage raw(1000))" ); - + oci8_test_sql_execute($c, $stmtarray); $stmt = oci_parse ($c, "insert into phptestrawtable (id, fileimage) values (:id, :fileimage)"); diff --git a/ext/oci8/tests/define3.phpt b/ext/oci8/tests/define3.phpt index 70426f61b4..701c89db54 100644 --- a/ext/oci8/tests/define3.phpt +++ b/ext/oci8/tests/define3.phpt @@ -14,7 +14,7 @@ $stmtarray = array( "drop table phpdefblobtable", "create table phpdefblobtable (id number(10), fileimage blob)" ); - + oci8_test_sql_execute($c, $stmtarray); // Load data @@ -78,7 +78,7 @@ while (oci_fetch($stmt)) { $stmtarray = array( "drop table phpdefblobtable" ); - + oci8_test_sql_execute($c, $stmtarray); echo "Done\n"; diff --git a/ext/oci8/tests/descriptors.phpt b/ext/oci8/tests/descriptors.phpt index 9a4c650c47..0b4aeb09f7 100644 --- a/ext/oci8/tests/descriptors.phpt +++ b/ext/oci8/tests/descriptors.phpt @@ -41,7 +41,7 @@ require dirname(__FILE__).'/drop_table.inc'; echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(1) { ["BLOB"]=> object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/edition_2.phpt b/ext/oci8/tests/edition_2.phpt index 6d56f9be5c..9ec5f4b96d 100644 --- a/ext/oci8/tests/edition_2.phpt +++ b/ext/oci8/tests/edition_2.phpt @@ -92,7 +92,7 @@ foreach ($values_array as $val ) { if ($c1) { get_edit_attr($c1); oci_close($c1); - } + } } echo "\n\n**Test 1.5 - Negative case with an invalid string value. *********\n"; diff --git a/ext/oci8/tests/exec_fetch.phpt b/ext/oci8/tests/exec_fetch.phpt index 52d515ffc4..b318ee48fc 100644 --- a/ext/oci8/tests/exec_fetch.phpt +++ b/ext/oci8/tests/exec_fetch.phpt @@ -15,7 +15,7 @@ var_dump(oci_fetch_array($stmt)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): ORA-00942: %s in %s on line %d bool(false) diff --git a/ext/oci8/tests/execute_mode.phpt b/ext/oci8/tests/execute_mode.phpt index 90570cae80..ffa97f0f2f 100644 --- a/ext/oci8/tests/execute_mode.phpt +++ b/ext/oci8/tests/execute_mode.phpt @@ -14,6 +14,6 @@ oci_execute($stmt, -1); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- Warning: oci_execute(): Invalid execute mode given: -1 in %s on line %d Done diff --git a/ext/oci8/tests/fetch.phpt b/ext/oci8/tests/fetch.phpt index 6fdec313f1..a290603487 100644 --- a/ext/oci8/tests/fetch.phpt +++ b/ext/oci8/tests/fetch.phpt @@ -43,7 +43,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_all.phpt b/ext/oci8/tests/fetch_all.phpt index b8155b170b..fe34bd8ece 100644 --- a/ext/oci8/tests/fetch_all.phpt +++ b/ext/oci8/tests/fetch_all.phpt @@ -45,7 +45,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/fetch_all1.phpt b/ext/oci8/tests/fetch_all1.phpt index 00e747cc35..20afe5967c 100644 --- a/ext/oci8/tests/fetch_all1.phpt +++ b/ext/oci8/tests/fetch_all1.phpt @@ -45,7 +45,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_all2.phpt b/ext/oci8/tests/fetch_all2.phpt index 261c46f38b..ca43348c2b 100644 --- a/ext/oci8/tests/fetch_all2.phpt +++ b/ext/oci8/tests/fetch_all2.phpt @@ -50,7 +50,7 @@ var_dump(oci_fetch_all($s, $all, 0, 1, OCI_BOTH)); var_dump($all); require dirname(__FILE__).'/drop_table.inc'; - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_array.phpt b/ext/oci8/tests/fetch_array.phpt index 03640e5901..9b67f27e8f 100644 --- a/ext/oci8/tests/fetch_array.phpt +++ b/ext/oci8/tests/fetch_array.phpt @@ -97,7 +97,7 @@ while ($row = oci_fetch_array($s, OCI_NUM+OCI_RETURN_NULLS)) { } require dirname(__FILE__).'/drop_table.inc'; - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_into1.phpt b/ext/oci8/tests/fetch_into1.phpt index 05fc78aa01..68e5f9cfae 100644 --- a/ext/oci8/tests/fetch_into1.phpt +++ b/ext/oci8/tests/fetch_into1.phpt @@ -58,7 +58,7 @@ var_dump(ocifetchinto($s, $all, OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS)); var_dump($all); require dirname(__FILE__).'/drop_table.inc'; - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/fetch_into2.phpt b/ext/oci8/tests/fetch_into2.phpt index 39b1dc72b9..2d72541580 100644 --- a/ext/oci8/tests/fetch_into2.phpt +++ b/ext/oci8/tests/fetch_into2.phpt @@ -46,7 +46,7 @@ var_dump(ocifetchinto($s, $all, 1000000)); var_dump($all); require dirname(__FILE__).'/drop_table.inc'; - + echo "Done\n"; ?> --EXPECTF-- diff --git a/ext/oci8/tests/lob_001.phpt b/ext/oci8/tests/lob_001.phpt index a6967fa787..432239d129 100644 Binary files a/ext/oci8/tests/lob_001.phpt and b/ext/oci8/tests/lob_001.phpt differ diff --git a/ext/oci8/tests/lob_003.phpt b/ext/oci8/tests/lob_003.phpt index 95193bccf6..b0b1d31af4 100644 Binary files a/ext/oci8/tests/lob_003.phpt and b/ext/oci8/tests/lob_003.phpt differ diff --git a/ext/oci8/tests/lob_004.phpt b/ext/oci8/tests/lob_004.phpt index 03d4201521..a363199776 100644 --- a/ext/oci8/tests/lob_004.phpt +++ b/ext/oci8/tests/lob_004.phpt @@ -7,7 +7,7 @@ require(dirname(__FILE__).'/skipif.inc'); ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- = 0; $i--) { $row = oci_fetch_array($s); var_dump($row['BLOB']->load()); var_dump($row['BLOB']->truncate(($i-1)*10)); - + oci_commit($c); } diff --git a/ext/oci8/tests/lob_031.phpt b/ext/oci8/tests/lob_031.phpt index ee99e4ceec..9916844292 100644 --- a/ext/oci8/tests/lob_031.phpt +++ b/ext/oci8/tests/lob_031.phpt @@ -7,7 +7,7 @@ require(dirname(__FILE__).'/skipif.inc'); ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- import("does_not_exist")); var_dump($blob->saveFile("does_not_exist")); require(dirname(__FILE__).'/drop_table.inc'); - + echo "Done\n"; - + ?> --EXPECTF-- object(OCI-Lob)#%d (1) { diff --git a/ext/oci8/tests/lob_044.phpt b/ext/oci8/tests/lob_044.phpt index a49c0b7571..4ed661c0e6 100644 --- a/ext/oci8/tests/lob_044.phpt +++ b/ext/oci8/tests/lob_044.phpt @@ -7,7 +7,7 @@ require(dirname(__FILE__).'/skipif.inc'); ?> --FILE-- --FILE-- --FILE-- ---EXPECTF-- +--EXPECTF-- Fatal error: Allowed memory size of 10485760 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d diff --git a/ext/oci8/tests/persistent.phpt b/ext/oci8/tests/persistent.phpt index 884cd35a4c..1bdfc3c90f 100644 --- a/ext/oci8/tests/persistent.phpt +++ b/ext/oci8/tests/persistent.phpt @@ -4,7 +4,7 @@ reusing persistent connections --FILE-- ---EXPECTF-- +--EXPECTF-- resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) resource(%d) of type (oci8 persistent connection) diff --git a/ext/oci8/tests/prefetch_old.phpt b/ext/oci8/tests/prefetch_old.phpt index ac43771c6b..7f50993a64 100644 --- a/ext/oci8/tests/prefetch_old.phpt +++ b/ext/oci8/tests/prefetch_old.phpt @@ -46,7 +46,7 @@ $stmtarray = array( ); oci8_test_sql_execute($c, $stmtarray); - + echo "Done\n"; ?> --EXPECT-- diff --git a/ext/oci8/tests/privileged_connect.phpt b/ext/oci8/tests/privileged_connect.phpt index 3b72f2021a..3e06283421 100644 --- a/ext/oci8/tests/privileged_connect.phpt +++ b/ext/oci8/tests/privileged_connect.phpt @@ -4,7 +4,7 @@ privileged connect tests --FILE-- ---EXPECTF-- +--EXPECTF-- array(2) { [0]=> NULL diff --git a/ext/oci8/tests/serverversion.phpt b/ext/oci8/tests/serverversion.phpt index 6cbb5aaad0..1c4b7d7d26 100644 --- a/ext/oci8/tests/serverversion.phpt +++ b/ext/oci8/tests/serverversion.phpt @@ -13,7 +13,7 @@ if (!empty($dbase)) { else { var_dump($c = oci_connect($user, $password)); } - + $v = oci_server_version($c); var_dump(str_replace("\n", "", $v)); diff --git a/ext/oci8/tests/statement_cache.phpt b/ext/oci8/tests/statement_cache.phpt index d903b8de22..8ab9ddc8c1 100644 --- a/ext/oci8/tests/statement_cache.phpt +++ b/ext/oci8/tests/statement_cache.phpt @@ -24,7 +24,7 @@ var_dump(oci_fetch_array($stmt)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECTF-- array(2) { [0]=> string(1) "4" diff --git a/ext/oci8/tests/uncommitted.phpt b/ext/oci8/tests/uncommitted.phpt index a779bba340..cb90e4a514 100644 --- a/ext/oci8/tests/uncommitted.phpt +++ b/ext/oci8/tests/uncommitted.phpt @@ -4,7 +4,7 @@ uncommitted connection --FILE-- ---EXPECT-- +--EXPECT-- Done -- cgit v1.2.1