From da8e8adc46d61b30d02174afb7cf2ed3d2018c18 Mon Sep 17 00:00:00 2001 From: Herman Venter Date: Mon, 10 Jun 2013 14:55:08 -0700 Subject: [PATCH] Add back a necessary null check Diff 817612 added a null check, but inadvertently removed a null check. --- hphp/runtime/base/program_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hphp/runtime/base/program_functions.cpp b/hphp/runtime/base/program_functions.cpp index 8d7ad20bb..da8414dd1 100644 --- a/hphp/runtime/base/program_functions.cpp +++ b/hphp/runtime/base/program_functions.cpp @@ -706,7 +706,7 @@ static void prepare_args(int &argc, char **&argv, const StringVec &args, const char *file) { argv = (char **)malloc((args.size() + 2) * sizeof(char*)); argc = 0; - if (*file) { + if (file && *file) { argv[argc++] = (char*)file; } for (int i = 0; i < (int)args.size(); i++) {