Re: Bug in oracle.c in php4

From: Date: Tue, 10 Oct 2000 17:48:13 +0000
Subject: Re: Bug in oracle.c in php4
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-34611@lists.php.net to get a copy of this message
Derick Rethans wrote: > > Hello, > > Kirill Maximov wrote: > > > > } > > > ZEND_FETCH_RESOURCE(cursor, , ); > > > > On an error, it'll return NULL here. I'm afraid, it should be like this: > > > > cursor = (oraCursor *) zend_fetch_resource(arg, -1, "Oracle-Cursor", NULL, 1, > > le_cursor); > > if (!cursor) > > RETURN_FALSE; > > > > could be my mistake, but I thougt ZEND_FETCH_RESOURCE imediately returns from the function > with NULL, so > > if (!cursor) > > will never be reached. Well, I used zend_fetch_resource, not ZEND_FETCH_RESOURCE ;-). See definition of ZEND_FETCH_RESOURCE in Zend/zend_list.h. > > > > > > > > > if (zend_list_delete((*arg)->value.lval) == FAILURE) > > > RETURN_FALSE > > > > > > RETURN_TRUE; > > > } > > > /* }}} */ > > -- > Derick Rethans > JDI Media Solutions > > H.v.Tussenbroekstraat 1 > 6952 BL Dieren > The Netherlands > > e-mail: d.rethans@jdimedia.nl > http://www.jdimedia.nl/

Attachment: [text/x-vcard] Card for Kirill Maximov kir.vcf
« previous php.dev (#34611) next »