Hi,

I have got this warning in taxonomy term pages

Strict warning: Only variables should be passed by reference in metatag_views_post_render() (linea 1342 di sites\all\modules\metatag\metatag.module).

The problem seems to be the function array_pop. Array_pop expects an array variable by reference.

I modified line 1342 of metatag.module

$entity = array_pop(entity_load($entity_name, $view->args));

In

$entity = entity_load($entity_name, $view->args);
$entity = array_pop($entity);

And now works fine, is this the right way?
I hope this will be helpful.

Files: 
CommentFileSizeAuthor
#2 metatag-n1840402.patch719 bytesDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Comments

I've also encountered that warning after updating meta tags from 7.x-1.0-beta1 to beta2
Strict warning: Only variables should be passed by reference in function metatag_views_post_render() (line 1342 in sites/all/modules/metatag/metatag.module).
This warning is generated and shown every time I'm trying to open any tag (taxonomy term) url.
It was perfectly fine before update to beta2. Reverting back to beta1 fixes the warning.
This error is only shown when php has E_STRICT enabled in error_reporting.

Status:Active» Needs review
StatusFileSize
new719 bytes
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

One of those should have known better errors. Doh!

Status:Needs review» Fixed

Committed.

Great, thanks!

Version 7.x-1.0-beta3 has been released and includes this work. Am closing this issue in an effort to keep the issue queue clean. Thank you all for your continued help!

Status:Fixed» Closed (fixed)