Parse error: syntax error, unexpected '}' in recurly/templates/recurly-invoice.tpl.php on line 12

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

svipsa created an issue. See original summary.

svipsa’s picture

Status: Active » Needs review
FileSize
1001 bytes

Fixed syntax error, unexpected '}'

Leon Kessler’s picture

Just found this error too and created a patch before finding this issue.

I've taken it a step further and moved some of the logic to the preprocess function, as we really shouldn't be setting variables and doing if statements like this in the tpl file.

aburke626’s picture

This looks great, thank you! @leon.nk, one thing on your patch - can you change line 10 on recurly-invoice.tpl to if (isset($error_message)): for the case when there is no recurly error, Drupal is throwing an error.

Leon Kessler’s picture

@aburke626 this should not happen because I added the error_message as a variable in the theme function, with a default value of NULL.
Did you clear cache's before you tried this?

aburke626’s picture

I had cleared cache, otherwise it wouldn't have been working at all. No idea what was going on, but of course when I tried to test it again today, I didn't get an error.

aburke626’s picture

Status: Needs review » Reviewed & tested by the community

  • aburke626 committed baf0b68 on 7.x-2.x authored by leon.nk
    Issue #2652674 by svipsa, leon.nk: syntax error, unexpected '}'
    
aburke626’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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