(PHP ifx_errormsg) Fixed Informix bug where ifx_errormsg() would Segfault

on an unopened connecection and with an errorcode supplied
This commit is contained in:
Corne' Cornelius 2003-02-24 06:34:37 +00:00
parent a7132f74fd
commit 7afe50fc5c

View File

@ -1650,6 +1650,7 @@ PHP_FUNCTION(ifx_errormsg)
}
maxmsglen = 255;
msglen = maxmsglen; // Some bug fix, rgetlmsg doesnt always set the value
ifx_errmsg = (char *)malloc(maxmsglen + 1);
if (ifx_errorcode != 0) {
rgetlmsg(ifx_errorcode, ifx_errmsg, maxmsglen, &msglen);