From 1b05ce68d7e5844c7110819941afcfce5079ff9e Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sat, 22 Mar 2008 22:04:21 +0000 Subject: [PATCH] fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi --- ext/phar/phar_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index 35bcd81375..8fa3579500 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -537,7 +537,8 @@ PHP_METHOD(Phar, webPhar) basename++; } - if (strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1)) { + if ((strlen(sapi_module.name) == sizeof("cgi-fcgi")-1 && !strncmp(sapi_module.name, "cgi-fcgi", sizeof("cgi-fcgi")-1)) + || (strlen(sapi_module.name) == sizeof("cgi")-1 && !strncmp(sapi_module.name, "cgi", sizeof("cgi")-1))) { char *testit; testit = sapi_getenv("SCRIPT_NAME", sizeof("SCRIPT_NAME")-1 TSRMLS_CC); -- 2.50.1