After upgrading to php7.1 the above error occurs.

Proposed solution:

Make the eval() validates over the code with 'return' statement in the eval() function.

Patch file attached

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

abedajam created an issue. See original summary.

arunkumark’s picture

@abedajam

It seems the code is working fine in PHP7. Kindly ensure/validate is your PHP code have any syntax errors. Also, there is no need to have the php tags( and ) for evaluation.

iStryker’s picture

Status: Active » Reviewed & tested by the community

Patch fixed my error. Was getting ParseError: syntax error, unexpected end of file in custom_breadcrumbs_is_visible()....so something tells me this code fails if $trimmed is empty;

lamp5’s picture

Version: 7.x-2.0-beta1 » 7.x-2.x-dev
FileSize
804 bytes

Needs apply on the latest dev.

  • lamp5 committed aa3cecd on 7.x-2.x
    Issue #3002780 by abedajam, lamp5: ParseError: syntax error, unexpected...
lamp5’s picture

Status: Reviewed & tested by the community » Fixed
lamp5’s picture

I checked this again and return statement should be on the end of function if visibility_php is empty

  • lamp5 committed c10d3ef on 7.x-2.x
    Issue #3002780 by lamp5, abedajam: ParseError: syntax error, unexpected...

Status: Fixed » Closed (fixed)

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