PHP_FUNCTION(sybase_close)
{
- pval *sybase_link_index;
+ pval *sybase_link_index = 0;
int id;
sybase_link *sybase_ptr;
break;
}
-
ZEND_FETCH_RESOURCE2(sybase_ptr, sybase_link *, &sybase_link_index, id, "Sybase-Link", sybase_globals.le_link, sybase_globals.le_plink);
- zend_list_delete(id); /* XXX this IS A BUG!!!! */
+ if (sybase_link_index) {
+ zend_list_delete(sybase_link_index->value.lval);
+ } else {
+ zend_list_delete(id);
+ }
RETURN_TRUE;
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */