Implementations of hook_services_request_preprocess_alter and hook_services_request_postprocess_alter can't currently modify either the arguments being passed to a method or the return value. The attached patch fixes this.

CommentFileSizeAuthor
services-alter-by-reference.patch1.03 KBcotto

Comments

marcingy’s picture

Status: Needs review » Needs work

This is not the normal drupal approach to these things, I am not comfortable with the approach being used here at all.

marcingy’s picture

Status: Needs work » Reviewed & tested by the community

Ah I see it is a d6 hack

 if (is_array($data) && isset($data['__drupal_alter_by_ref'])) {
    $by_ref_parameters = $data['__drupal_alter_by_ref'];
    unset($data['__drupal_alter_by_ref']);
  }
marcingy’s picture

Status: Reviewed & tested by the community » Fixed

Committed thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.