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

Array to string conversion in CRM_Utils_Hook::post()

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.6
    • Fix Version/s: 4.5
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Notice: Array to string conversion in CRM_Utils_Hook::post() (rule 288 of /civicrm/CRM/Utils/Hook.php).

      Comes from a call in civicrm_api3_generic_setValue($apiRequest):

      • at the top of the function '$entity' is defined as the entity of the api request;
      • at the bottom of the function '$entity' is overriden and became an array.

      if (CRM_Core_DAO::setFieldValue(_civicrm_api3_get_DAO($entity), $id, $field, $value))

      { $entity = array('id' => $id, $field => $value); CRM_Utils_Hook::post('edit', $entity, $id, $entity); return civicrm_api3_create_success($entity); }

      else

      { return civicrm_api3_create_error("error assigning $field=$value for $entity (id=$id)"); }

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              wdecraene Wim De Craene
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: