Comment 2 for bug 387963

Revision history for this message
Gregory Colpart (evolix) (reg-evolix) wrote :

Hello,

Bug is in arguments handling:

--8<--
        cnt = ARG_COUNT(ht);
        switch (cnt) {
                case 2:
                        if (zend_get_parameters_ex(2, &username, &password)==FAILURE) {
                                RETURN_FALSE;
                        }
                        break;
                case 3:
                        if (zend_get_parameters_ex(3, &username, &password, &status) == FAILURE) {
                                RETURN_FALSE;
                        }
                        if (!PZVAL_IS_REF(*status)) {
                                php_error(E_WARNING, "Error variable must be passed by reference");
                                RETURN_FALSE;
                        }
                        pval_destructor(*status);
                        break;
                default:
                        WRONG_PARAM_COUNT;
                        break;
        }
--8<--

Dirty workarounds :
- don't use third args. use only two args.
- Comment "pval_destructor(*status);" line and rebuild the package.