Title: Parse error with json &#8211; WP update
Last modified: March 12, 2018

---

# Parse error with json – WP update

 *  [madsenand](https://wordpress.org/support/users/madsenand/)
 * (@madsenand)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/parse-error-with-json-wp-update/)
 * Dear WP experts,
 * I’m new to WP, and I just got this error message, when I updated to the new version
   of WP. I’m sure its about an old theme I got – which hasn’t been updated – but
   I don’t now how to fix it.
 * Error message:
 * Parse error: syntax error, unexpected ‘)’ in /var/www/fkmagasin.dk/public_html/
   wp-content/themes/ModernMag/fw/core/Common.php on line 611
 * This is the mentioned code line, I found in FTP:
 * return json_decode(json_encode($arr), );
 * Does anybody know how to fix this and save my theme. Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fparse-error-with-json-wp-update%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Mr Case](https://wordpress.org/support/users/mr-case/)
 * (@mr-case)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/parse-error-with-json-wp-update/#post-10065451)
 * the error says unexpected ‘)’ so maybe change the line:
 * `return json_decode(json_encode($arr), );`
 * to this
 * `return json_decode(json_encode($arr));`
 * if that does not remove your error, change it back to original and try another
   thing.
    json decode can accept a ‘true’ argument, so you can also try this:
 * `return json_decode(json_encode($arr), true);`
    -  This reply was modified 8 years, 2 months ago by [Mr Case](https://wordpress.org/support/users/mr-case/).
    -  This reply was modified 8 years, 2 months ago by [Mr Case](https://wordpress.org/support/users/mr-case/).
 *  [Simon Prosser](https://wordpress.org/support/users/pross/)
 * (@pross)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/parse-error-with-json-wp-update/#post-10065522)
 * That theme appears to be a commercial product, you should contact the theme author
   for support as thats what you paid for.
 *  Thread Starter [madsenand](https://wordpress.org/support/users/madsenand/)
 * (@madsenand)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/parse-error-with-json-wp-update/#post-10065762)
 * Thank you for the answers. I couldn’t get it to work, so I re-installed a backup
   version of the site and WP

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

The topic ‘Parse error with json – WP update’ is closed to new replies.

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)
 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [madsenand](https://wordpress.org/support/users/madsenand/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/parse-error-with-json-wp-update/#post-10065762)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
