Update sybase_ct module to newer API's
| From: | Joey Smith | Date: | Sun, 10 Sep 2000 05:42:56 +0000 |
| Subject: | Update sybase_ct module to newer API's | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-32811@lists.php.net to get a copy of this message | ||
Just in case no one noticed my comments in php-cvs:
Could someone in the core team please look over my patches and make sure
I'm doing this right? I have a few more patches to this module waiting,
and plenty more to come, but I want to be absolutely SURE I'm doing this
correctly.
Also, I created the following patch to ext/sybase_ct/php_sybase_ct.c to
prevent from getting Seg faults in sybase_query when there is no active
link, but I'm not sure if this is the BEST way to do it. It seems the
MySQL module is doing it differently, but I cannot see how...any
feedback is more than welcome. In the meantime, I will see if I can't
see how MySQL is doing its magic. :)
@@ -962,6 +962,12 @@
WRONG_PARAM_COUNT;
break;
}
+
+ if ( (!sybase_link_index) || (id == -1))
+ {
+ php_error(E_WARNING, "Warning - Supplied argument is not
a valid Sybase-Link resource");
+ RETURN_FALSE;
+ }
ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *,
sybase_link_index, id, "Sybase-Link", sybase_globals.le_link,
sybase_globals.le_plink);