]> granicus.if.org Git - php/commitdiff
fix all frontcontroller tests - cgi sapi was not being detected, only fastcgi
authorGreg Beaver <cellog@php.net>
Sat, 22 Mar 2008 22:04:21 +0000 (22:04 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 22 Mar 2008 22:04:21 +0000 (22:04 +0000)
ext/phar/phar_object.c

index 35bcd81375b906bb9a6ca92226c988d40eb881ee..8fa35795003533bdecc4f1a5d9f52cf46aa5708c 100755 (executable)
@@ -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);