Title: Parse error: syntax error, unexpected &#039;:&#039;
Last modified: August 31, 2016

---

# Parse error: syntax error, unexpected ':'

 *  Resolved [christianmemije](https://wordpress.org/support/users/christianmemije/)
 * (@christianmemije)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-164/)
 * Versions 2.0.3 and 2.0.3.1 both give me the following error:
 * `Parse error: syntax error, unexpected ':' .../wp-content/themes/justwrite/functions.
   php on line 1018`
 * Version 2.0.2.1 works perfectley fine.
    Might it have something to due with the
   PHP version? I have PHP 5.4.45 installed.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [christianmemije](https://wordpress.org/support/users/christianmemije/)
 * (@christianmemije)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-164/#post-7210168)
 * So turns out the shorthand ternary operator isn’t supported in the PHP version
   on my server, so I just changed line 1018
    from: `$format = get_post_format()?:'
   standard';`
 * to:
    `$format = get_post_format() ? get_post_format() : 'standard';`
 * Since it is a a very simple fix, hopefully it can implemented in next version
   to avoid compatibility issues.
 * Thanks 🙂
 *  Theme Author [acosmin](https://wordpress.org/support/users/acosmin/)
 * (@acosmin)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-164/#post-7210174)
 * ok, thanks for the heads up 🙂
 *  Thread Starter [christianmemije](https://wordpress.org/support/users/christianmemije/)
 * (@christianmemije)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-164/#post-7210334)
 * Just a clarification. I was actually using PHP 5.2, not PHP 5.4.45, which explains
   the incompatibility. Sorry for the confusion.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Parse error: syntax error, unexpected ':'’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/justwrite/2.0.3.6/screenshot.png)
 * JustWrite
 * [Support Threads](https://wordpress.org/support/theme/justwrite/)
 * [Active Topics](https://wordpress.org/support/theme/justwrite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/justwrite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/justwrite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [christianmemije](https://wordpress.org/support/users/christianmemije/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-164/#post-7210334)
 * Status: resolved