Title: Parse error after upgrading theme
Last modified: August 19, 2016

---

# Parse error after upgrading theme

 *  Resolved [WxDaddy](https://wordpress.org/support/users/wxdaddy/)
 * (@wxdaddy)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/)
 * After prompted to ‘upgrade themes’ in admin, my site is no longer visible via
   main site url or through admin. Parse error displays:
 * Parse error: syntax error, unexpected T_STRING in /home/drift10/public_html/jb/
   wp-content/themes/suffusion/functions/media.php on line 372
 * I unzipped and uploaded a “clean” version of the suffusion theme and I’m still
   getting the error. Any ideas on where to start?
 * When trying to access admin page, I get this parse error:
 * Parse error: syntax error, unexpected ‘(‘, expecting ‘}’ in /home/drift10/public_html/
   jb/wp-content/themes/suffusion/admin/suffusion-options-page.php on line 1356

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

 *  [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927674)
 * Which version of PHP are you on? I checked the lines you mentioned – they look
   clean and error-free.
 *  Thread Starter [WxDaddy](https://wordpress.org/support/users/wxdaddy/)
 * (@wxdaddy)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927675)
 * PhP version 5.2.13
 *  [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927799)
 * If I were to hazard a guess I would say there is a conflict with the PHP version.
   Line 372 in media.php is:
    `if ($new_img_path instanceof WP_Error) {` This should
   work without hassles, but since it is not, is there any chance you might be able
   to switch to a newer version of PHP?
 *  Thread Starter [WxDaddy](https://wordpress.org/support/users/wxdaddy/)
 * (@wxdaddy)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927801)
 * Thank you.
 * I’ve contacted my host and will see if they can upgrade my php version.
 * In the meantime, I’m still unable to access the blog except via ftp. Can I put
   the files of another template within the suffusion folder and expect it to work
   simply for the means of access?
 *  [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927810)
 * You can delete the entire Suffusion folder if you want, from `wp-content/themes`.
   You can then [download the older version](http://wordpress.org/extend/themes/download/suffusion.3.7.3.zip),
   unzip it, and copy the unzipped `suffusion` folder to `wp-content/themes`. If
   you don’t put in the older version of Suffusion after deleting the version that
   is causing you issues, you will still be fine because you will be switched to
   TwentyTen.
 *  [swanksalot](https://wordpress.org/support/users/swanksalot/)
 * (@swanksalot)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927818)
 * I have the same problem, with PHP 5.2.17 installed (pair.com).
 * I deleted Suffusion 3.7.5, and reinstalled 3.7.3.
 * Could there be any other solution (in the event that my webhost won’t upgrade)
 * thanks!
 *  [ExpIorer](https://wordpress.org/support/users/expiorer/)
 * (@expiorer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927828)
 * I have the same problem, with PHP 4.4.0.
 * … reinstalled 3.7.3.
 *  [ExpIorer](https://wordpress.org/support/users/expiorer/)
 * (@expiorer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927831)
 * I fixed it (kinda).
    Since I don`t know why this theme should do image resizing,
   I disabled this function by making it return error by default. Line 372 now looks
   like:
 * if (true) {
 * but admin panel still does not work
    (my server does not show errors so I don`
   t know whitch line to fix)
 *  [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927841)
 * [@explorer](https://wordpress.org/support/users/explorer/),
 * > Since I don’t know why this theme should do image resizing, I disabled this
   > function by making it return error by default.
 * Image resizing is used quite extensively for a lot of features in the theme, 
   so if you are forcing an error, you will lose out on it. Examples of resizing
   are in Featured Content, the magazine template, excerpts etc.
 * Here is some research done by a user on the theme forum: [http://www.aquoid.com/forum/viewtopic.php?f=2&t=4201#p17619](http://www.aquoid.com/forum/viewtopic.php?f=2&t=4201#p17619).
   Specifically with PHP 4.x you will have errors. One option is to use the older
   function is_a(). The way you would do it is to replace this line:
 * `if ($new_img_path instanceof WP_Error) {`
 * with this line:
 * `if (is_a($new_img_path, 'WP_Error')) {`
 * This might work.
 * Regarding the control panel issue you fall in a small percentage of users who
   are facing a very weird bug. I have already released a workaround, so once it
   is approved you can download the new version.
 * Sayontan.
 *  [Alwyn Botha](https://wordpress.org/support/users/123milliseconds/)
 * (@123milliseconds)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927845)
 * >>>(my server does not show errors so I don`t know whitch line to fix)
 * [http://webdevstudios.com/2009/04/07/how-to-display-error-messages-in-wordpress/](http://webdevstudios.com/2009/04/07/how-to-display-error-messages-in-wordpress/)
 * [http://digwp.com/2009/07/monitor-php-errors-wordpress/](http://digwp.com/2009/07/monitor-php-errors-wordpress/)
 *  Thread Starter [WxDaddy](https://wordpress.org/support/users/wxdaddy/)
 * (@wxdaddy)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927867)
 * I had thought I was using php 5, but as it turns out my server was set to php
   4. I switched it and now the suffusion theme is working just fine on my site.
 * Thanks!
 *  [ExpIorer](https://wordpress.org/support/users/expiorer/)
 * (@expiorer)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927934)
 * So every theme I use do some image resizing (extensively)?
    I don`t have free
   space for that, that is bullshit. Was there anything wrong with version 3.7.3
   I should know or I can keep it?
 *  [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * (@sayontan)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927942)
 * > So every theme I use do some image resizing (extensively)?
   >  I don`t have free
   > space for that, that is bullshit.
 * That’s funny – wonder how you have had space so far, then. Suffusion has had 
   image resizing in place since version 3.2.2 released more than 13 months back,
   when it started using TimThumb. 3.7.3 was the last version to feature TimThumb,
   which now got phased out. Any decent theme you pick up will use explicit image
   resizing, either through WP’s native resizing capability (which will create more
   images than a script-based resizing), or a combination of the native resizing
   and some other scripts. A lot of the themes in the theme repository are using
   TimThumb, or have stopped using TimThumb recently in favour of native WP resizing.
   Look beyond the official repository and almost every theme you find will have
   TimThumb.
 * Nothing wrong with 3.7.3 – you are free to use it, but never for once think that
   resizing is not happening there.

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

The topic ‘Parse error after upgrading theme’ is closed to new replies.

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [suffusion](https://wordpress.org/support/topic-tag/suffusion/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 5 participants
 * Last reply from: [Sayontan Sinha](https://wordpress.org/support/users/sayontan/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/parse-error-after-upgrading-theme/#post-1927942)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
