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

_post hook objectRef is not always an object

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      The 'post' hook has a parameter for objectRef. Ie: the object that's been saved.

      • @param object $objectRef
      • The reference to the object if available.

      However, it's not always an object. When the post hook is fired for objectName 'Profile', for example, it's actually an array.

      We should standardise the data that comes out of these hooks. It may well be a problem in other hooks as well.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              john John K.
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: