diff --git a/ext/oci8/oci8.stub.php b/ext/oci8/oci8.stub.php index 8fc39bd378d53..4c4ed64559139 100644 --- a/ext/oci8/oci8.stub.php +++ b/ext/oci8/oci8.stub.php @@ -951,8 +951,10 @@ function oci_register_taf_callback($connection, ?callable $callback): bool {} /** @param resource $connection */ function oci_unregister_taf_callback($connection): bool {} -#[\AllowDynamicProperties] class OCILob { + /** @var resource */ + public mixed $descriptor = null; + /** * @alias oci_lob_save * @tentative-return-type @@ -1080,8 +1082,9 @@ public function close(): bool {} public function free(): bool {} } -#[\AllowDynamicProperties] class OCICollection { + /** @var resource */ + public mixed $collection = null; /** * @alias oci_free_collection * @tentative-return-type diff --git a/ext/oci8/oci8_arginfo.h b/ext/oci8/oci8_arginfo.h index a6869afd2e64b..58a1d43ca8f2d 100644 --- a/ext/oci8/oci8_arginfo.h +++ b/ext/oci8/oci8_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 850d4e63296c95a27cdfc1244d63b1ed496acd54 */ + * Stub hash: 99e690256bdafbdcda848cbef1c43264f9977151 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_oci_define_by_name, 0, 3, _IS_BOOL, 0) ZEND_ARG_INFO(0, statement) @@ -899,11 +899,12 @@ static zend_class_entry *register_class_OCILob(void) INIT_CLASS_ENTRY(ce, "OCILob", class_OCILob_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; - zend_string *attribute_name_AllowDynamicProperties_class_OCILob = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1); - zend_add_class_attribute(class_entry, attribute_name_AllowDynamicProperties_class_OCILob, 0); - zend_string_release(attribute_name_AllowDynamicProperties_class_OCILob); + zval property_descriptor_default_value; + ZVAL_NULL(&property_descriptor_default_value); + zend_string *property_descriptor_name = zend_string_init("descriptor", sizeof("descriptor") - 1, 1); + zend_declare_typed_property(class_entry, property_descriptor_name, &property_descriptor_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY)); + zend_string_release(property_descriptor_name); return class_entry; } @@ -914,11 +915,12 @@ static zend_class_entry *register_class_OCICollection(void) INIT_CLASS_ENTRY(ce, "OCICollection", class_OCICollection_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; - zend_string *attribute_name_AllowDynamicProperties_class_OCICollection = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1); - zend_add_class_attribute(class_entry, attribute_name_AllowDynamicProperties_class_OCICollection, 0); - zend_string_release(attribute_name_AllowDynamicProperties_class_OCICollection); + zval property_collection_default_value; + ZVAL_NULL(&property_collection_default_value); + zend_string *property_collection_name = zend_string_init("collection", sizeof("collection") - 1, 1); + zend_declare_typed_property(class_entry, property_collection_name, &property_collection_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY)); + zend_string_release(property_collection_name); return class_entry; } diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 2b1117dd6515f..64deb8de5fd0d 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -40,6 +40,9 @@ #define OCI_STMT_CALL 10 #endif +#define Z_OCILOB_DESCRIPTOR_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 0) +#define Z_OCICOLLECTION_COLLECTION_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 0) + #define ERROR_ARG_POS(arg_num) (getThis() ? (arg_num-1) : (arg_num)) /* {{{ Register a callback function for Oracle Transparent Application Failover (TAF) */ @@ -233,7 +236,8 @@ PHP_FUNCTION(oci_free_descriptor) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -264,7 +268,8 @@ PHP_FUNCTION(oci_lob_save) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -290,7 +295,8 @@ PHP_FUNCTION(oci_lob_import) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -316,7 +322,8 @@ PHP_FUNCTION(oci_lob_load) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -356,7 +363,8 @@ PHP_FUNCTION(oci_lob_read) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -388,7 +396,8 @@ PHP_FUNCTION(oci_lob_eof) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -414,7 +423,8 @@ PHP_FUNCTION(oci_lob_tell) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -435,7 +445,8 @@ PHP_FUNCTION(oci_lob_rewind) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -460,7 +471,8 @@ PHP_FUNCTION(oci_lob_seek) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -507,7 +519,8 @@ PHP_FUNCTION(oci_lob_size) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -540,7 +553,8 @@ 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) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -568,12 +582,13 @@ PHP_FUNCTION(oci_lob_append) RETURN_THROWS(); } - if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp_dest = Z_OCILOB_DESCRIPTOR_P(z_descriptor_dest); + if (Z_TYPE_P(tmp_dest) != IS_RESOURCE) { 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) { + tmp_from = Z_OCILOB_DESCRIPTOR_P(z_descriptor_from); + if (Z_TYPE_P(tmp_from) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } @@ -606,7 +621,8 @@ PHP_FUNCTION(oci_lob_truncate) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -648,7 +664,8 @@ PHP_FUNCTION(oci_lob_erase) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -673,7 +690,8 @@ PHP_FUNCTION(oci_lob_flush) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -703,7 +721,8 @@ PHP_FUNCTION(ocisetbufferinglob) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -727,7 +746,8 @@ PHP_FUNCTION(ocigetbufferinglob) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -760,12 +780,13 @@ PHP_FUNCTION(oci_lob_copy) RETURN_THROWS(); } - if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_dest), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp_dest = Z_OCILOB_DESCRIPTOR_P(z_descriptor_dest); + if (Z_TYPE_P(tmp_dest) != IS_RESOURCE) { 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) { + tmp_from = Z_OCILOB_DESCRIPTOR_P(z_descriptor_from); + if (Z_TYPE_P(tmp_from) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } @@ -791,12 +812,13 @@ PHP_FUNCTION(oci_lob_is_equal) RETURN_THROWS(); } - if ((tmp_first = zend_hash_str_find(Z_OBJPROP_P(z_descriptor_first), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp_first = Z_OCILOB_DESCRIPTOR_P(z_descriptor_first); + if (Z_TYPE_P(tmp_first) != IS_RESOURCE) { 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) { + tmp_second = Z_OCILOB_DESCRIPTOR_P(z_descriptor_second); + if (Z_TYPE_P(tmp_second) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property. The second argument should be valid descriptor object"); RETURN_FALSE; } @@ -846,7 +868,8 @@ PHP_FUNCTION(oci_lob_export) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -928,7 +951,8 @@ PHP_METHOD(OCILob, writeTemporary) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -952,7 +976,8 @@ PHP_METHOD(OCILob, close) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { + tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); RETURN_FALSE; } @@ -988,7 +1013,7 @@ PHP_FUNCTION(oci_new_descriptor) } object_init_ex(return_value, oci_lob_class_entry_ptr); - add_property_resource(return_value, "descriptor", descriptor->id); + ZVAL_RES(Z_OCILOB_DESCRIPTOR_P(return_value), descriptor->id); } /* }}} */ @@ -2097,7 +2122,8 @@ PHP_FUNCTION(oci_free_collection) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2121,7 +2147,8 @@ PHP_FUNCTION(oci_collection_append) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2146,7 +2173,8 @@ PHP_FUNCTION(oci_collection_element_get) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2169,12 +2197,13 @@ PHP_FUNCTION(oci_collection_assign) RETURN_THROWS(); } - if ((tmp_dest = zend_hash_str_find(Z_OBJPROP_P(z_collection_dest), "collection", sizeof("collection")-1)) == NULL) { + tmp_dest = Z_OCICOLLECTION_COLLECTION_P(z_collection_dest); + if (Z_TYPE_P(tmp_dest) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property. The first argument should be valid collection object"); RETURN_FALSE; } - - if ((tmp_from = zend_hash_str_find(Z_OBJPROP_P(z_collection_from), "collection", sizeof("collection")-1)) == NULL) { + tmp_from = Z_OCICOLLECTION_COLLECTION_P(z_collection_from); + if (Z_TYPE_P(tmp_from) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property. The second argument should be valid collection object"); RETURN_FALSE; } @@ -2202,7 +2231,8 @@ PHP_FUNCTION(oci_collection_element_assign) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2227,7 +2257,8 @@ PHP_FUNCTION(oci_collection_size) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2252,7 +2283,8 @@ PHP_FUNCTION(oci_collection_max) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2277,7 +2309,8 @@ PHP_FUNCTION(oci_collection_trim) RETURN_THROWS(); } - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_collection), "collection", sizeof("collection")-1)) == NULL) { + tmp = Z_OCICOLLECTION_COLLECTION_P(z_collection); + if (Z_TYPE_P(tmp) != IS_RESOURCE) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); RETURN_FALSE; } @@ -2308,7 +2341,7 @@ PHP_FUNCTION(oci_new_collection) 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); + ZVAL_RES(Z_OCICOLLECTION_COLLECTION_P(return_value), collection->id); } else { RETURN_FALSE; diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 91bba23127b12..fef019b97fd64 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -42,6 +42,9 @@ typedef ub8 oci_phpsized_int; typedef ub4 oci_phpsized_int; #endif +#define Z_OCILOB_DESCRIPTOR_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 0) +#define Z_OCICOLLECTION_COLLECTION_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 0) + /* {{{ php_oci_statement_create() Create statemend handle and allocate necessary resources */ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char *query, int query_len) @@ -1139,7 +1142,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l { zval *tmp; - if (Z_TYPE_P(param) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(param), "collection", sizeof("collection")-1)) == NULL) { + if (Z_TYPE_P(param) != IS_OBJECT || !(tmp = Z_OCICOLLECTION_COLLECTION_P(param))) { php_error_docref(NULL, E_WARNING, "Unable to find collection property"); return 1; } @@ -1161,7 +1164,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l { zval *tmp; - if (Z_TYPE_P(param) != IS_OBJECT || (tmp = zend_hash_str_find(Z_OBJPROP_P(param), "descriptor", sizeof("descriptor")-1)) == NULL) { + if (Z_TYPE_P(param) != IS_OBJECT || !(tmp = Z_OCILOB_DESCRIPTOR_P(param))) { php_error_docref(NULL, E_WARNING, "Unable to find descriptor property"); return 1; } @@ -1480,10 +1483,7 @@ sb4 php_oci_bind_out_callback( * out-bind as the contents would have been changed for in/out * binds (Bug #46994). */ - if ((tmp = zend_hash_str_find(Z_OBJPROP_P(val), "descriptor", sizeof("descriptor")-1)) == NULL) { - php_error_docref(NULL, E_WARNING, "Unable to find object outbind descriptor property"); - return OCI_ERROR; - } + tmp = Z_OCILOB_DESCRIPTOR_P(val); PHP_OCI_ZVAL_TO_DESCRIPTOR_EX(tmp, desc); desc->lob_size = -1; /* force OCI8 to update cached size */