|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
semi Smarty n00b
Joined: 08 Sep 2017 Posts: 2
|
Posted: Fri Sep 08, 2017 6:18 pm Post subject: - Unexpected ";", expected one of: "}" e |
|
|
So the line below triggers this error from smarty
That if statement seems to trigger the error
Code: | {if is_array($data.page_images[0]) && count($data.page_images[0]) > 0 } |
The error thrown by smart is this one
Quote: | Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "string:{nocache}<!DOCTYPE html> <html lang="en"..." on line 266 "{if is_array($data.page_images[0]) && count($data.page_images[0]) > 0 }" - Unexpected ";", expected one of: "}" <-- thrown in
|
Can someone please help ? |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Sat Sep 09, 2017 2:37 am Post subject: |
|
|
It seems the string that is being delivered to Smarty has been html encoded. That is to say, the && is being converted to && at some point.
(Note that on any other line, none of the other characters typically encoded have been encoded: angles, quotes.
But on this line, the ampersand and right-angle have been.
This suggests to me that, perhaps (just a guess), you used an in-line editor in WYSIWYG mode to enter straight HTML. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Sep 11, 2017 3:01 pm Post subject: |
|
|
bsmither wrote: | That is to say, the && is being converted to && at some point. |
php_flag html_errors off |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|