mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
MFH: fix #42134 (oci_error() returns false after oci_new_collection() fails)
This commit is contained in:
parent
10fabe9092
commit
9efa1d8914
2
NEWS
2
NEWS
@ -74,6 +74,8 @@ PHP NEWS
|
||||
length). (Ilia)
|
||||
- Fixed bug #42135 (Second call of session_start() causes creation of SID).
|
||||
(Ilia)
|
||||
- Fixed bug #42134 (oci_error() returns false after oci_new_collection()
|
||||
fails). (Tony)
|
||||
- Fixed Bug #42112 (deleting a node produces memory corruption). (Rob)
|
||||
- Fixed Bug #42107 (sscanf broken when using %2$s format parameters). (Jani)
|
||||
- Fixed bug #42090 (json_decode causes segmentation fault). (Hannes)
|
||||
|
@ -1832,3 +1832,12 @@ static int php_oci_list_helper(zend_rsrc_list_entry *le, void *le_type TSRMLS_DC
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -55,7 +55,8 @@ php_oci_collection * php_oci_collection_create(php_oci_connection* connection, c
|
||||
|
||||
collection->connection = connection;
|
||||
collection->collection = NULL;
|
||||
|
||||
zend_list_addref(collection->connection->rsrc_id);
|
||||
|
||||
/* get type handle by name */
|
||||
PHP_OCI_CALL_RETURN(connection->errcode, OCITypeByName,
|
||||
(
|
||||
@ -741,3 +742,12 @@ void php_oci_collection_close(php_oci_collection *collection TSRMLS_DC)
|
||||
} /* }}} */
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -2169,3 +2169,12 @@ PHP_FUNCTION(oci_new_collection)
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -69,6 +69,8 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long typ
|
||||
|
||||
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
|
||||
descriptor->type = type;
|
||||
descriptor->connection = connection;
|
||||
zend_list_addref(descriptor->connection->rsrc_id);
|
||||
|
||||
PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0));
|
||||
|
||||
@ -79,8 +81,6 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, long typ
|
||||
return NULL;
|
||||
}
|
||||
|
||||
descriptor->connection = connection;
|
||||
|
||||
PHP_OCI_REGISTER_RESOURCE(descriptor, le_descriptor);
|
||||
|
||||
descriptor->lob_current_position = 0;
|
||||
@ -895,3 +895,12 @@ int php_oci_lob_write_tmp (php_oci_descriptor *descriptor, ub1 type, char *data,
|
||||
} /* }}} */
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -107,6 +107,7 @@ php_oci_statement *php_oci_statement_create (php_oci_connection *connection, cha
|
||||
statement->connection = connection;
|
||||
statement->has_data = 0;
|
||||
statement->nested = 0;
|
||||
zend_list_addref(statement->connection->rsrc_id);
|
||||
|
||||
if (OCI_G(default_prefetch) > 0) {
|
||||
php_oci_statement_set_prefetch(statement, OCI_G(default_prefetch) TSRMLS_CC);
|
||||
@ -1587,3 +1588,12 @@ php_oci_bind *php_oci_bind_array_helper_date(zval* var, long max_table_length, p
|
||||
} /* }}} */
|
||||
|
||||
#endif /* HAVE_OCI8 */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* End:
|
||||
* vim600: noet sw=4 ts=4 fdm=marker
|
||||
* vim<600: noet sw=4 ts=4
|
||||
*/
|
||||
|
@ -263,7 +263,6 @@ typedef struct { /* php_oci_out_column {{{ */
|
||||
#define PHP_OCI_REGISTER_RESOURCE(resource, le_resource) \
|
||||
do { \
|
||||
resource->id = ZEND_REGISTER_RESOURCE(NULL, resource, le_resource); \
|
||||
zend_list_addref(resource->connection->rsrc_id); \
|
||||
} while (0)
|
||||
|
||||
#define PHP_OCI_ZVAL_TO_CONNECTION(zval, connection) \
|
||||
|
Loading…
Reference in New Issue
Block a user