Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#4 | custom_breadcrumbs-3002780-4.patch | 804 bytes | lamp5 |
php_7_eval_code.patch | 496 bytes | abedajam | |
Comments
Comment #2
arunkumark@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.Comment #3
iStryker CreditAttribution: iStryker commentedPatch 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;
Comment #4
lamp5Needs apply on the latest dev.
Comment #6
lamp5Comment #7
lamp5I checked this again and return statement should be on the end of function if visibility_php is empty