diff options
author | Thies C. Arntzen <thies@php.net> | 1999-10-12 15:00:10 +0000 |
---|---|---|
committer | Thies C. Arntzen <thies@php.net> | 1999-10-12 15:00:10 +0000 |
commit | 7dfbf440efb4c3edb86f7480af474bf11d1f3a44 (patch) | |
tree | b879bc635be84c2949627d113f8ffca752cd70d3 | |
parent | 86bb3fa0c0ca46f4c2c2c69d0e66b3f9de1b1e99 (diff) | |
download | php-git-7dfbf440efb4c3edb86f7480af474bf11d1f3a44.tar.gz |
(php sybase_close) fixed obvious bug.
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 96d903680f..97fddccab8 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -623,7 +623,7 @@ PHP_FUNCTION(sybase_pconnect) PHP_FUNCTION(sybase_close) { - pval *sybase_link_index; + pval *sybase_link_index = 0; int id; sybase_link *sybase_ptr; @@ -642,10 +642,13 @@ PHP_FUNCTION(sybase_close) 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; } @@ -1561,3 +1564,10 @@ PHP_FUNCTION(sybase_min_server_severity) #endif + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + */ |