CRM-12683 - Fix URL path for the "vendor" directory
[civicrm-core.git] / bin / cli.class.php
index 692d7e7dde799423aac49f5166fa67c975c6f31e..9b6c4eb89a42d79b17aa262df684099cb1f844d5 100644 (file)
@@ -185,8 +185,12 @@ class civicrm_cli {
     $_SERVER['PHP_SELF'] = "/index.php";
     $_SERVER['HTTP_HOST'] = $this->_site;
     $_SERVER['REMOTE_ADDR'] = "127.0.0.1";
+    $_SERVER['SERVER_SOFTWARE'] = NULL;
+    $_SERVER['REQUEST_METHOD']  = 'GET';
+
     // SCRIPT_FILENAME needed by CRM_Utils_System::cmsRootPath
     $_SERVER['SCRIPT_FILENAME'] = __FILE__;
+
     // CRM-8917 - check if script name starts with /, if not - prepend it.
     if (ord($_SERVER['SCRIPT_NAME']) != 47) {
       $_SERVER['SCRIPT_NAME'] = '/' . $_SERVER['SCRIPT_NAME'];
@@ -204,8 +208,7 @@ class civicrm_cli {
     $class = 'CRM_Utils_System_' . $this->_config->userFramework;
 
     $cms = new $class();
-    if (!CRM_Utils_System::loadBootstrap(array(
-      ), FALSE, FALSE, $civicrm_root)) {
+    if (!CRM_Utils_System::loadBootstrap(array(), FALSE, FALSE, $civicrm_root)) {
       $this->_log(ts("Failed to bootstrap CMS"));
       return FALSE;
     }