fix crash due to mixed up params order
authorMichael Wallner <mike@php.net>
Mon, 13 Feb 2012 13:29:51 +0000 (13:29 +0000)
committerMichael Wallner <mike@php.net>
Mon, 13 Feb 2012 13:29:51 +0000 (13:29 +0000)
php_http_params.c

index a8b8d2db22ed5d893027db7f2d165a33885c61b4..49d0538776dcd69a4304c0a6efc8534e754bd748 100644 (file)
@@ -288,13 +288,13 @@ PHP_METHOD(HttpParams, __construct)
                if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z!/z/z/z/", &zparams, &param_sep, &arg_sep, &val_sep)) {
                        switch (ZEND_NUM_ARGS()) {
                                case 4:
-                                       zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC);
+                                       zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC);
                                        /* no break */
                                case 3:
                                        zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("arg_sep"), arg_sep TSRMLS_CC);
                                        /* no break */
                                case 2:
-                                       zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("val_sep"), val_sep TSRMLS_CC);
+                                       zend_update_property(php_http_params_class_entry, getThis(), ZEND_STRL("param_sep"), param_sep TSRMLS_CC);
                                        /* no break */
                        }