Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-12196

Invoking cli.php gives notice 'undefined index'

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.3, 4.2.7, 4.3.0
    • Fix Version/s: 4.3.0
    • Labels:
      None

      Description

      When I invoke cli.php via PHP CLI with CiviCRM 4.1.3 and Drupal 7.15 I get notices ...

      Notice: Undefined index: REQUEST_METHOD in drupal_page_is_cacheable() (line 1077 of /var/www/citybibleforum/includes/bootstrap.inc).
      Notice: Undefined index: SERVER_SOFTWARE in require_once() (line 13 of /var/www/citybibleforum/includes/mail.inc).

      I observe that Drupal's scripts/drupal.sh defines the defaults for these variables as ...

      $_SERVER['SERVER_SOFTWARE'] = NULL;
      $_SERVER['REQUEST_METHOD'] = 'GET';

      The notices disappear when I set these variables in the _bootstrap() function in CiviCRM's bin/cli.php

      A patch for 4.3 is attached.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              ken Ken West
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: