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.
Parse error: syntax error, unexpected '}' in recurly/templates/recurly-invoice.tpl.php on line 12
Comment | File | Size | Author |
---|---|---|---|
#3 | syntax_error-2652674-3.patch | 2.16 KB | Leon Kessler |
#2 | recurly_syntax_error_2652674_1.patch | 1001 bytes | svipsa |
Comments
Comment #2
svipsa CreditAttribution: svipsa commentedFixed syntax error, unexpected '}'
Comment #3
Leon Kessler CreditAttribution: Leon Kessler commentedJust 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.
Comment #4
aburke626This 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.Comment #5
Leon Kessler CreditAttribution: Leon Kessler commented@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?
Comment #6
aburke626I 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.
Comment #7
aburke626Comment #9
aburke626