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

CRM_Utils_Hook_Drupal::pre calls drupal hook_civicrm_pre with the wrong parameters

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Labels:
      None

      Description

      Note that CRM_Utils_Hook_Drupal::pre is calling the Drupal hook_civicrm_pre with the calling conventions for CRM_Utils_Hook_Drupal::post. If this were ever called, it would likely cause a run-time error.

      $params really need to get passed; it looks like this is the place to inject custom data into the object creation process.

      <pre>
      function pre( $op, $objectName, $id, &$params ) {
      // copied from user_module_invoke
      foreach (module_list() as $module) {
      $function = $module . '_civicrm_pre';
      if ( function_exists( $function ) )

      { $function( $op, $objectName, $objectId, $objectRef ); }

      }
      }

      </pre>

        Attachments

        1. Drupal.php
          4 kB
          Rob Thorne
        2. Drupal-php-for-php4.diff
          1 kB
          Rob Thorne
        3. torenware-contribution.diff
          8 kB
          Rob Thorne

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              torenware Rob Thorne
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: