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

soap.php in wordpress throws a php error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.1.2
    • Component/s: CiviMail
    • Labels:

      Description

      Accessing soap.php in wordpress results in the following error:

      Notice: Trying to get property of non-object in /home/leyla/dev/wordpress_3_1_1/wp-content/plugins/civicrm/civicrm/CRM/Core/Config.php on line 293

      This happens due to $wpdb global var being undefined on line 293 of Config.php due to the fact that wordpress environment is not loaded at this point.

      A workaround is to check for $wpdb being undefined and load the wordpress bootstrap to ensure the proper environment and vars are setup. - see attached diff with a proposed fix.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              alleyla Leyla Alieva
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: