Title: Update theme to PHP7
Last modified: September 1, 2016

---

# Update theme to PHP7

 *  Resolved [islp](https://wordpress.org/support/users/islp/)
 * (@islp)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-theme-to-php7/)
 * Hello, I’m trying to run WP on PHP7 but I get an error 500 because my theme uses
   some PHP4 code. I would like to repair the theme myself.
 * The problems are here:
 *     ```
       class widget_flickr extends WP_Widget { 
   
       	// Widget Settings
       	function widget_flickr() {
       		$widget_ops = array('description' => __('Display your latest Flickr Photos', CORE_THEME_NAME) );
       		$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'flickr' );
       		$this->WP_Widget( 'flickr', __('Core Flickr', CORE_THEME_NAME), $widget_ops, $control_ops );
       	}
       ```
   
 * and here:
 *     ```
       class TinyMCE_Shortcodes {
   
       	// Constructor
   
       	function TinyMCE_Shortcodes () {
   
       		//admin_init
       		add_action( 'admin_init', array( &$this, 'init' ) );
   
       		//Only use wp_ajax if user is logged in
       		add_action( 'wp_ajax_check_url_action', array( &$this, 'ajax_action_check_url' ) );
   
       	}
       ```
   
 * The **PHP Compatibility Checker** plugin reports for both the following error:
   **
   Deprecated PHP4 style constructor are not supported since PHP7
 * Now, I would easily change the function name with the `__construct` equivalent,
   but I’m not sure this would be enough.
 * Can you help me? Any suggestion is appreciated.

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-theme-to-php7/#post-7694378)
 * What theme are you using? Where did you download it from?
 *  Thread Starter [islp](https://wordpress.org/support/users/islp/)
 * (@islp)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/update-theme-to-php7/#post-7694379)
 * I downloaded it from Envato Market. I tried to contact the author but I received
   no answer, maybe because I need to purchase extended support. Anyway, the theme
   was last updated more than one year ago.

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

The topic ‘Update theme to PHP7’ is closed to new replies.

## Tags

 * [PHP7](https://wordpress.org/support/topic-tag/php7/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [islp](https://wordpress.org/support/users/islp/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/update-theme-to-php7/#post-7694379)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
