I added code to up the reference count of the database connection

reference. This change fixes bug #11489 in php version 4.0.6.
I derived this fix from the my_sql module.
This commit is contained in:
Paul Moosman 2001-07-23 16:10:10 +00:00
parent 076f4f5136
commit 22a8e9536a

View File

@ -640,6 +640,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
link = (int) index_ptr->ptr;
ptr = zend_list_find(link, &type); /* check if the link is still there */
if (ptr && (type==le_link || type==le_plink)) {
zend_list_addref(link);
return_value->value.lval = SybCtG(default_link) = link;
return_value->type = IS_RESOURCE;
efree(hashed_details);
@ -678,6 +679,7 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
efree(hashed_details);
SybCtG(default_link)=return_value->value.lval;
zend_list_addref(SybCtG(default_link));
}