ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

What's wrong with my conditional statement?

October 29, 2012 7:03am

Subscribe [1]
  • #1 / Oct 29, 2012 7:03am

    ukhj

    7 posts

    Hi,

    I’m using the following statement to display the date of future entries, but it produces a syntax error:

    {if '{entry_date format="%U"}' > '{current_time="%U"}'}Coming: {entry_date format="%d %M"}{/if}

    Parse error: syntax error, unexpected ‘}’ in /var/www/vhosts/sitename.com/httpdocs/expressionengine/system/expressionengine/libraries/Functions.php(680) : eval()‘d code on line 74

    Why would this be? It looks correct to me?

    Thanks!

    Anthony

  • #2 / Oct 30, 2012 3:51pm

    Kevin Smith

    4784 posts

    Hi Anthony,

    I believe the issue is simply in this part:

    {current_time="%U"}

    It should be:

    {current_time format="%U"}

    Does that do it?

  • #3 / Oct 31, 2012 5:21am

    ukhj

    7 posts

    It does indeed. Thanks so much, I would never have noticed it in a million years.

  • #4 / Nov 01, 2012 12:18am

    Kevin Smith

    4784 posts

    Glad to help. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases