OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR);
if (ora_error_code) {
- int tmp_buf_len = strlen((char *)tmp_buf);
+ int tmp_buf_len = (int) strlen((char *)tmp_buf);
if (tmp_buf_len > 0 && tmp_buf[tmp_buf_len - 1] == '\n') {
tmp_buf[tmp_buf_len - 1] = '\0';
PHP_OCI_CALL(OCIErrorGet, (error_handle, (ub4)1, NULL, &error_code, error_buf, (ub4)error_buf_size, (ub4)OCI_HTYPE_ERROR));
if (error_code) {
- int err_buf_len = strlen((char *)error_buf);
+ int err_buf_len = (int) strlen((char *)error_buf);
if (err_buf_len && error_buf[err_buf_len - 1] == '\n') {
error_buf[err_buf_len - 1] = '\0';
charset = NULL;
}
- connection = php_oci_do_connect_ex(username, username_len, password, password_len, NULL, 0, dbname, dbname_len, charset, session_mode, persistent, exclusive);
+ connection = php_oci_do_connect_ex(username, (int) username_len, password, (int) password_len, NULL, 0, dbname, (int) dbname_len, charset, session_mode, persistent, exclusive);
#ifdef HAVE_OCI8_DTRACE
if (DTRACE_OCI8_CONNECT_RETURN_ENABLED()) {
le = Z_RES_P(zvp);
found = 1;
if (le->type == le_index_ptr) {
- void *ptr;
+ zend_resource *ptr;
- ptr = le->ptr; /* PHPNG TODO */
- if (ptr && (le->type == le_connection)) {
- connection = (php_oci_connection *)ptr;
+ ptr = (zend_resource *) le->ptr; /* PHPNG TODO */
+ if (ptr && (ptr->type == le_connection)) {
+ connection = (php_oci_connection *)ptr->ptr;
}
}
}
* TODO: put in negative code for non-persistent stubs
*/
if (connection && connection->is_persistent && connection->is_stub) {
- if (php_oci_create_session(connection, NULL, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_create_session(connection, NULL, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
smart_str_free(&hashed_details);
zend_hash_del(&EG(persistent_list), connection->hash_key);
* connect/password change
*/
if (!use_spool) {
- if (php_oci_old_create_session(connection, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_old_create_session(connection, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
php_oci_connection_close(connection);
return NULL;
}
} else {
/* create using the client-side session pool */
- if (php_oci_create_session(connection, session_pool, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, session_mode)) {
+ if (php_oci_create_session(connection, session_pool, dbname, dbname_len, username, username_len, password, password_len, new_password, new_password_len, (int) session_mode)) {
php_oci_connection_close(connection);
return NULL;
}
{
sword errstatus;
- PHP_OCI_CALL_RETURN(errstatus, OCIServerVersion, (connection->svc, connection->err, (text *)version, version_size, OCI_HTYPE_SVCCTX));
+ PHP_OCI_CALL_RETURN(errstatus, OCIServerVersion, (connection->svc, connection->err, (text *)version, (ub4) version_size, OCI_HTYPE_SVCCTX));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
if (!(column->indicator == -1)) {
zval element;
- php_oci_column_to_zval(column, &element, fetch_mode);
+ php_oci_column_to_zval(column, &element, (int) fetch_mode);
if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) {
add_index_zval(return_value, i, &element);
*/
static int php_oci_old_create_session(php_oci_connection *connection, char *dbname, int dbname_len, char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, int session_mode)
{
- ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? OCI_G(statement_cache_size) : 0;
+ ub4 statement_cache_size = 0;
+
+ if (OCI_G(statement_cache_size) > 0) {
+ if (OCI_G(statement_cache_size) > UB4MAXVAL-1)
+ statement_cache_size = (ub4) UB4MAXVAL-1;
+ else
+ statement_cache_size = (ub4) OCI_G(statement_cache_size);
+ }
/* Create the OCI environment separate for each connection */
if (!(connection->env = php_oci_create_env(connection->charset))) {
ub4 purity = -2; /* Illegal value to initialize */
#endif
time_t timestamp = time(NULL);
- ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? OCI_G(statement_cache_size) : 0;
+ ub4 statement_cache_size = 0;
+
+ if (OCI_G(statement_cache_size) > 0) {
+ if (OCI_G(statement_cache_size) > UB4MAXVAL-1)
+ statement_cache_size = (ub4) UB4MAXVAL-1;
+ else
+ statement_cache_size = (ub4) OCI_G(statement_cache_size);
+ }
/* Persistent connections have private session pools */
if (connection->is_persistent && !connection->private_spool &&
php_oci_connection *connection = collection->connection;
sword errstatus;
- PHP_OCI_CALL_RETURN(errstatus, OCICollTrim, (connection->env, connection->err, trim_size, collection->collection));
+ PHP_OCI_CALL_RETURN(errstatus, OCICollTrim, (connection->env, connection->err, (sb4) trim_size, collection->collection));
if (errstatus != OCI_SUCCESS) {
errstatus = php_oci_error(connection->err, errstatus);
define->name = (text*) ecalloc(1, name_len+1);
memcpy(define->name, name, name_len);
define->name[name_len] = '\0';
- define->name_len = name_len;
- define->type = type;
+ define->name_len = (ub4) name_len;
+ define->type = (ub4) type;
define->zval = var;
RETURN_TRUE;
RETURN_FALSE;
}
- if (php_oci_bind_array_by_name(statement, name, name_len, bind_var, max_array_len, max_item_len, type)) {
+ if (php_oci_bind_array_by_name(statement, name, (sb4) name_len, bind_var, max_array_len, max_item_len, type)) {
RETURN_FALSE;
}
RETURN_TRUE;
RETURN_FALSE;
}
- if (php_oci_lob_write(descriptor, offset, data, data_len, &bytes_written)) {
+ if (php_oci_lob_write(descriptor, (ub4) offset, data, (ub4) data_len, &bytes_written)) {
RETURN_FALSE;
}
RETURN_TRUE;
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;
switch(whence) {
case PHP_OCI_SEEK_CUR:
- descriptor->lob_current_position += offset;
+ descriptor->lob_current_position += (ub4) offset;
break;
case PHP_OCI_SEEK_END:
if ((descriptor->lob_size + offset) >= 0) {
- descriptor->lob_current_position = descriptor->lob_size + offset;
+ descriptor->lob_current_position = descriptor->lob_size + (ub4) offset;
}
else {
descriptor->lob_current_position = 0;
break;
case PHP_OCI_SEEK_SET:
default:
- descriptor->lob_current_position = (offset > 0) ? offset : 0;
+ descriptor->lob_current_position = (offset > 0) ? (ub4) offset : 0;
break;
}
+ if ((descriptor->lob_current_position < 0) ||
+ (descriptor->lob_current_position > UB4MAXVAL-1)) {
+ php_error_docref(NULL, E_WARNING, "Invalid offset or LOB position");
+ RETURN_FALSE;
+ }
RETURN_TRUE;
}
/* }}} */
{
zval *tmp, *z_descriptor = getThis();
php_oci_descriptor *descriptor;
- size_t data_len;
+ zend_long data_len;
zend_long write_len = 0;
ub4 bytes_written;
char *data;
RETURN_LONG(0);
}
- if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, data_len, &bytes_written)) {
+ if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, (ub4) data_len, &bytes_written)) {
RETURN_FALSE;
}
RETURN_LONG(bytes_written);
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (php_oci_lob_erase(descriptor, offset, length, &bytes_erased)) {
+ if (php_oci_lob_erase(descriptor, offset, (ub4) length, &bytes_erased)) {
RETURN_FALSE;
}
RETURN_LONG(bytes_erased);
PHP_OCI_ZVAL_TO_DESCRIPTOR(tmp, descriptor);
- if (php_oci_lob_write_tmp(descriptor, type, data, data_len)) {
+ if (php_oci_lob_write_tmp(descriptor, type, data, (int) data_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
- if (php_oci_statement_execute(statement, mode)) {
+ if (php_oci_statement_execute(statement, (ub4) mode)) {
RETURN_FALSE;
}
RETURN_TRUE;
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- if (GC_REFCOUNT(connection->id) == 1)
+ if (GC_REFCOUNT(connection->id) == 2) /* CHANGED VERSION::PHP7
+ Changed the refCount to 2 since
+ internally Zend engine increments
+ RefCount value by 1 */
zend_list_close(connection->id);
/* ZVAL_NULL(z_connection); */
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- statement = php_oci_statement_create(connection, query, query_len);
+ statement = php_oci_statement_create(connection, query, (int) query_len);
if (statement) {
RETURN_RES(statement->id);
RETURN_FALSE;
}
- if (php_oci_password_change(connection, user, user_len, pass_old, pass_old_len, pass_new, pass_new_len)) {
+ if (php_oci_password_change(connection, user, (int) user_len, pass_old, (int) pass_old_len, pass_new, (int) pass_new_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
RETURN_FALSE;
}
- connection = php_oci_do_connect_ex(user, user_len, pass_old, pass_old_len, pass_new, pass_new_len, dbname, dbname_len, NULL, OCI_DEFAULT, 0, 0);
+ connection = php_oci_do_connect_ex(user, (int) user_len, pass_old, (int) pass_old_len, pass_new, (int) pass_new_len, dbname, (int) dbname_len, NULL, OCI_DEFAULT, 0, 0);
if (!connection) {
RETURN_FALSE;
}
PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection);
- if (php_oci_collection_append(collection, value, value_len)) {
+ if (php_oci_collection_append(collection, value, (int) value_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
PHP_OCI_ZVAL_TO_COLLECTION(tmp, collection);
- if (php_oci_collection_element_set(collection, element_index, value, value_len)) {
+ if (php_oci_collection_element_set(collection, element_index, value, (int) value_len)) {
RETURN_FALSE;
}
RETURN_TRUE;
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- if ( (collection = php_oci_collection_create(connection, tdo, tdo_len, schema, schema_len)) ) {
+ 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);
}
}
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
- descriptor->type = type;
+ descriptor->type = (ub4) type;
descriptor->connection = connection;
++GC_REFCOUNT(descriptor->connection->id);
sword errstatus;
if (descriptor->type == OCI_DTYPE_FILE) {
- return read_length;
+ return (int) read_length;
}
if (!descriptor->chunk_size) {
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- return read_length; /* we have to return original length here */
+ return (int) read_length; /* we have to return original length here */
}
descriptor->chunk_size = chunk_size;
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
}
if ((read_length % descriptor->chunk_size) != 0) {
- return descriptor->chunk_size * ((read_length / descriptor->chunk_size) + 1);
+ return (int) descriptor->chunk_size * (((int) read_length / descriptor->chunk_size) + 1);
}
- return read_length;
+ return (int) read_length;
}
/* }}} */
requested_len = length;
}
- if (requested_len > (length - initial_offset)) {
+ if ((ub4) requested_len > (length - (ub4) initial_offset)) {
requested_len = length - initial_offset;
}
/* BLOBs don't have encoding, so bytes_per_char == 1 */
}
- ctx.alloc_len = (requested_len + 1) * bytes_per_char;
+ ctx.alloc_len = ((ub4) requested_len + 1) * bytes_per_char;
*data = ecalloc(bytes_per_char, requested_len + 1);
if (is_clob) {
bytes_read = requested_len;
}
- buffer_size = (requested_len < buffer_size ) ? requested_len : buffer_size; /* optimize buffer size */
+ buffer_size = ((int) requested_len < buffer_size ) ? (int) requested_len : buffer_size; /* optimize buffer size */
buffer_size = php_oci_lob_calculate_buffer(descriptor, buffer_size); /* use chunk size */
bufp = (ub1 *) ecalloc(1, buffer_size);
*bytes_written = data_len;
descriptor->lob_current_position += data_len;
- if (descriptor->lob_current_position > descriptor->lob_size) {
+ if ((int) descriptor->lob_current_position > (int) descriptor->lob_size) {
descriptor->lob_size = descriptor->lob_current_position;
}
if (length == -1) {
copy_len = length_from - descriptor_from->lob_current_position;
} else {
- copy_len = length;
+ copy_len = (ub4) length;
}
if ((int)copy_len <= 0) {
return 0;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobFlushBuffer, (connection->svc, connection->err, lob, flush_flag));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobFlushBuffer, (connection->svc, connection->err, lob, (ub4) flush_flag));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
return 1;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobTrim, (connection->svc, connection->err, lob, new_lob_length));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobTrim, (connection->svc, connection->err, lob, (ub4) new_lob_length));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
return 1;
}
- descriptor->lob_size = new_lob_length;
+ descriptor->lob_size = (ub4) new_lob_length;
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
return 0;
length = lob_length;
}
- PHP_OCI_CALL_RETURN(errstatus, OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, offset+1));
+ PHP_OCI_CALL_RETURN(errstatus, OCILobErase, (connection->svc, connection->err, lob, (ub4 *)&length, (ub4) offset+1));
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus);
case SQLT_NUM:
case SQLT_INT:
case SQLT_LNG:
- for (i = 0; i < bind->array.current_length; i++) {
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_LONG(entry, ((ub4 *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
}
break;
case SQLT_FLT:
- for (i = 0; i < bind->array.current_length; i++) {
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_DOUBLE(entry, ((double *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
}
break;
case SQLT_ODT:
- for (i = 0; i < bind->array.current_length; i++) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
oratext buff[1024];
ub4 buff_len = 1024;
memset((void*)buff,0,sizeof(buff));
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ 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_dtor(entry);
case SQLT_AVC:
case SQLT_STR:
case SQLT_LVC:
- for (i = 0; i < bind->array.current_length; i++) {
+ for (i = 0; i < (int) bind->array.current_length; i++) {
/* int curr_element_length = strlen(((text *)bind->array.elements)+i*bind->array.max_length); */
int curr_element_length = bind->array.element_lengths[i];
- if ((i < bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
+ if ((i < (int) bind->array.old_length) && (entry = zend_hash_get_current_data(hash)) != NULL) {
zval_dtor(entry);
ZVAL_STRINGL(entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
zend_hash_move_forward(hash);
/* {{{ php_oci_bind_by_name()
Bind zval to the given placeholder */
-int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long maxlength, ub2 type)
+int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long maxlength, ub2 type)
{
php_oci_collection *bind_collection = NULL;
php_oci_descriptor *bind_descriptor = NULL;
if (maxlength == 0) {
value_sz = PHP_OCI_PIECE_SIZE;
} else {
- value_sz = maxlength;
+ value_sz = (sb4) maxlength;
}
}
break;
(OCIBind **)&bindp->bind, /* bind hdl (will alloc) */
statement->err, /* error handle */
(text*) name, /* placeholder name */
- name_len, /* placeholder length */
+ (sb4) name_len, /* placeholder length */
(dvoid *)bind_data, /* in/out data */
value_sz, /* PHP_OCI_MAX_DATA_SIZE, */ /* max size of input/output data */
type, /* in/out data type */
convert_to_string(val);
*bufpp = Z_STRVAL_P(val);
- *alenp = Z_STRLEN_P(val);
+ *alenp = (ub4) Z_STRLEN_P(val);
*indpp = (dvoid *)&phpbind->indicator;
} else if (phpbind->statement != 0) {
/* RSET */
/* {{{ php_oci_bind_array_by_name()
Bind arrays to PL/SQL types */
-int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
+int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type)
{
php_oci_bind *bind, *bindp;
sword errstatus;
(OCIBind **)&bind->bind,
statement->err,
(text *)name,
- name_len,
+ (sb4) name_len,
(dvoid *) bind->array.elements,
(sb4) bind->array.max_length,
(ub2)type,
while ((entry = zend_hash_get_current_data(hash)) != NULL) {
convert_to_string_ex(entry);
- if (maxlength == -1 || Z_STRLEN_P(entry) > maxlength) {
+ if (maxlength == -1 || Z_STRLEN_P(entry) > (size_t) maxlength) {
maxlength = Z_STRLEN_P(entry) + 1;
}
memset(bind->array.elements, 0, max_table_length * (maxlength + 1) * sizeof(text));
bind->array.current_length = zend_hash_num_elements(Z_ARRVAL_P(var));
bind->array.old_length = bind->array.current_length;
- bind->array.max_length = maxlength;
+ bind->array.max_length = (ub4) maxlength;
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 = safe_emalloc(max_table_length, sizeof(sb2), 0);
for (i = 0; i < bind->array.current_length; i++) {
if ((entry = zend_hash_get_current_data(hash)) != NULL) {
convert_to_string_ex(entry);
- bind->array.element_lengths[i] = Z_STRLEN_P(entry);
+ bind->array.element_lengths[i] = (ub2) Z_STRLEN_P(entry);
if (Z_STRLEN_P(entry) == 0) {
bind->array.indicators[i] = -1;
}
int element_length;
convert_to_string_ex(entry);
- element_length = (maxlength > Z_STRLEN_P(entry)) ? Z_STRLEN_P(entry) : maxlength;
+ 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';
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), Z_STRLEN_P(entry), NULL, 0, NULL, 0, &oci_date));
+ 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));
if (errstatus != OCI_SUCCESS) {
/* failed to convert string to date */
php_oci_connection *connection; /* parent connection handle */
dvoid *descriptor; /* OCI descriptor handle */
ub4 type; /* descriptor type (FILE/LOB) */
- int lob_current_position; /* LOB internal pointer */
+ ub4 lob_current_position; /* LOB internal pointer */
int lob_size; /* cached LOB size. -1 = Lob wasn't initialized yet */
int buffering; /* cached buffering flag. 0 - off, 1 - on, 2 - on and buffer was used */
ub4 chunk_size; /* chunk size of the LOB. 0 - unknown */
void php_oci_statement_free(php_oci_statement *statement);
int php_oci_bind_pre_exec(zval *data, void *result);
int php_oci_bind_post_exec(zval *data);
-int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long maxlength, ub2 type);
+int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long maxlength, ub2 type);
sb4 php_oci_bind_in_callback(dvoid *ictxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 *alenp, ub1 *piecep, dvoid **indpp);
sb4 php_oci_bind_out_callback(dvoid *octxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 **alenpp, ub1 *piecep, dvoid **indpp, ub2 **rcodepp);
php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAMETERS, int need_data);
int php_oci_cleanup_pre_fetch(zval *data);
int php_oci_statement_get_type(php_oci_statement *statement, ub2 *type);
int php_oci_statement_get_numrows(php_oci_statement *statement, ub4 *numrows);
-int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type);
+int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t name_len, zval *var, zend_long max_table_length, zend_long maxlength, zend_long type);
php_oci_bind *php_oci_bind_array_helper_number(zval *var, zend_long max_table_length);
php_oci_bind *php_oci_bind_array_helper_double(zval *var, zend_long max_table_length);
php_oci_bind *php_oci_bind_array_helper_string(zval *var, zend_long max_table_length, zend_long maxlength);
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
*/
}
bool(true)
-Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
}
bool(true)
-Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
}
bool(true)
-Warning: OCI-Collection::size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: OCI-Collection::size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
}
bool(true)
-Warning: oci_collection_size(): %d is not a valid oci8 collection resource in %s on line %d
+Warning: oci_collection_size(): supplied resource is not a valid oci8 collection resource in %s on line %d
bool(false)
Done
bool(true)
string(4) "some"
-Warning: oci_result(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_result(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)
Done
Test 1
1
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
3
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
5
-Warning: oci_fetch_array(): %d is not a valid oci8 statement resource in %s on line %d
+Warning: oci_fetch_array(): supplied resource is not a valid oci8 statement resource in %s on line %d
===DONE===
int(4)
bool(true)
-Warning: OCI-Lob::write(): %d is not a valid oci8 descriptor resource in %slob_014.php on line %d
+Warning: OCI-Lob::write(): %s is not a valid oci8 descriptor resource in %slob_014.php on line %d
bool(false)
array(1) {
[0]=>
int(4)
bool(true)
-Warning: OCI-Lob::write(): %d is not a valid oci8 descriptor resource in %s on line %d
+Warning: OCI-Lob::write(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)
-Warning: oci_free_descriptor(): %d is not a valid oci8 descriptor resource in %s on line %d
+Warning: oci_free_descriptor(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)
Warning: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in %s on line %d
test data
object(OCI-Lob)#%d (1) {
["descriptor"]=>
- resource(%d) of type (oci8 descriptor)
+ resource(%d) of type (Unknown)
}
Test 3 - no preallocated descriptor
resource(%d) of type (oci8 connection)
bool(true)
-Warning: oci_parse() expects parameter 1 to be resource, null given in %s on line %d
-NULL
+Warning: oci_parse(): supplied resource is not a valid oci8 connection resource in %sold_oci_close1.php on line %d
+bool(false)
Done