After upgrade to the latest version Views 4.7.x-1.4 from old Views 4.7.0 My web page display the error below:

Parse error: syntax error, unexpected T_RETURN in .../modules/views/modules/views_taxonomy.inc on line 257

open the file views_taxonomy.inc and browse to line 257 I can't find anything wrong:

line 253 function views_handler_field_allterms($fieldinfo, $fielddata, $value, $data) {
line 254   if ($fieldinfo['vocabulary']) {
line 255     $terms = taxonomy_node_get_terms_by_vocabulary($data->nid, $fieldinfo['vocabulary']);
line 256   }
line 257  else {
line 258     $terms = taxonomy_node_get_terms($data->nid);
line 259   }

a bug?

Comments

douggreen’s picture

The current views 4.7.x-1.4 version is:

line 253  else {
line 254    $node->taxonomy = $terms;
line 255    $links = taxonomy_link('taxonomy terms', $node);
line 256  }
line 257  return return !empty($links) ? theme('links', $links) : '';
line 258 }

I'm not sure how you got your "current" version. If you used CVS to check it out, and you already had changes to your local source code, CVS will try to merge the versions, and when it does this it typically makes the php invalid, requiring manual correction. I suggest that you start with a fresh directory and checkout/get the current views module again.

douggreen’s picture

Eventhough we appear to have had different text versions of the module, I am getting the same error on a fresh checkout of views 4.7.x-1.4 that I am not getting on the 4.7.x-1.3 version. I recommend that you use the 1.3 version until this gets fixed.

astra’s picture

Upgrading to Views 4.7.x-1.3 It seems no problem for my site.

merlinofchaos’s picture

Status: Active » Closed (duplicate)