Re: Bug in oracle.c in php4
| From: | chrisv at b0rked dot dhs dot org | Date: | Tue, 10 Oct 2000 17:04:07 +0000 |
| Subject: | Re: Bug in oracle.c in php4 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-34606@lists.php.net to get a copy of this message | ||
On Tue, 10 Oct 2000, Derick Rethans wrote:
> Hi,
>
> it seems that you cannot check if ZEND_FETCH_RESOURCE2 succeeds or not.
It verifies it for you--
Zend/zend_list.h:97 --
#define ZEND_VERIFY_RESOURCE(rsrc) \
if (!rsrc) { \
RETURN_NULL(); \
}
Zend/zend_list.h:102 --
#define ZEND_FETCH_RESOURCE2(rsrc, rsrc_type, passed_id, default_id, resource_type_name,
resource_type1,resource_type2) \
rsrc = (rsrc_type) zend_fetch_resource(passed_id, default_id, resource_type_name, NULL, 2,
resource_type1, resource_type2); \
ZEND_VERIFY_RESOURCE(rsrc);
So if the resource is not found, null is returned.
Chris