add LICENSE file
[bdrem.git] / src / phar-stub.php
index 64c463e1b114d84418ee43a838b358822fa5add9..8535a6f4f6ae73ea3ee2d6e117dc8bde147dc314 100644 (file)
@@ -41,6 +41,13 @@ set_include_path(
     . PATH_SEPARATOR . 'phar://' . __FILE__ . '/lib/'
 );
 Phar::webPhar(null, $web, null, array(), 'rewritePath');
+
+//work around https://bugs.php.net/bug.php?id=52322
+if (php_sapi_name() == 'cgi-fcgi') {
+    require 'phar://' . __FILE__ . '/' . $web;
+    exit();
+}
+
 require 'phar://' . __FILE__ . '/' . $cli;
 __HALT_COMPILER();
 ?>