Strict warning: Only variables should be passed by reference in makemeeting_field_formatter_view() (line 515 of /Applications/MAMP/htdocs/nittany-7.x-1.x-dev/sites/all/modules/makemeeting/makemeeting.module).

Comments

btopro’s picture

Status: Needs work » Needs review
StatusFileSize
new0 bytes

Patch to resolve issue, very minor code shuffle so reset() isn't called inline with entity id return data.

SebCorbin’s picture

Status: Needs review » Needs work

Patch is empty :)

btopro’s picture

hmm... that was weird... $entity_ids = entity_extract_ids($entity_type, $entity); needs to be set to a variable and then reset, can't be done inline at least with some vesions of PHP.

Here's the function to alter at least:

function makemeeting_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $content = array();
  foreach ($items as $delta => $item) {
    $entity_ids = entity_extract_ids($entity_type, $entity);
    $instance += array(
      'entity_id' => reset($entity_ids),
      'language' => $langcode,
      'delta' => $delta
    );
    $content[] = drupal_get_form('makemeeting_answers_form_' . $instance['entity_id'], $item, $instance);
  }
  return $content;
}
SebCorbin’s picture

Status: Needs work » Needs review
StatusFileSize
new642 bytes

How about that, testbot?

Status: Needs review » Needs work

The last submitted patch, 1903144-4-entity_extract_id_strict_warning.patch, failed testing.

btopro’s picture

? is there something wrong w/ the tests cause neither this or the other patch I submitted are dangerous at all, yet are reporting failing. lol

SebCorbin’s picture

Status: Needs work » Fixed

Yes, testbot was messing with us, this is committed, thanks!

Status: Fixed » Closed (fixed)

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