From 43da51882c7aebcf3bef61deefd8c25287ff149b Mon Sep 17 00:00:00 2001 From: Paul Tarjan Date: Mon, 3 Jun 2013 22:35:51 -0700 Subject: [PATCH] fix argv in server mode Match zend. --- hphp/runtime/base/server/http_protocol.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hphp/runtime/base/server/http_protocol.cpp b/hphp/runtime/base/server/http_protocol.cpp index b16537b9f..572f68c5f 100644 --- a/hphp/runtime/base/server/http_protocol.cpp +++ b/hphp/runtime/base/server/http_protocol.cpp @@ -366,8 +366,8 @@ void HttpProtocol::PrepareSystemVariables(Transport *transport, server.set(s_PATH_INFO, r.pathInfo()); } - server.set(s_argv, r.queryString()); - server.set(s_argc, 0); + server.set(s_argv, CREATE_VECTOR1(r.queryString())); + server.set(s_argc, 1); server.set(s_GATEWAY_INTERFACE, s_CGI_1_1); server.set(s_SERVER_ADDR, String(RuntimeOption::ServerPrimaryIP)); server.set(s_SERVER_NAME, hostName);