]> granicus.if.org Git - php/commitdiff
Keep CLI args as binary strings.
authorAndrei Zmievski <andrei@php.net>
Tue, 12 Dec 2006 18:05:07 +0000 (18:05 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 12 Dec 2006 18:05:07 +0000 (18:05 +0000)
main/php_variables.c

index bc9713cb50ba6356821655d0102a3db1d0b6702e..e57c0f9ed8018a305a79d1736bca5e46b452465a 100644 (file)
@@ -654,7 +654,8 @@ static void php_build_argv(char *s, zval *track_vars_array TSRMLS_DC)
                int i;
                for (i = 0; i < SG(request_info).argc; i++) {
                        ALLOC_ZVAL(tmp);
-                       ZVAL_RT_STRING(tmp, SG(request_info).argv[i], 1);
+                       /* leave args as binary, since the encoding is not known */
+                       ZVAL_STRING(tmp, SG(request_info).argv[i], 1);
                        INIT_PZVAL(tmp);
                        if (zend_hash_next_index_insert(Z_ARRVAL_P(arr), &tmp, sizeof(zval *), NULL) == FAILURE) {
                                if (Z_TYPE_P(tmp) == IS_STRING) {