Title: Parse error: syntax error, unexpected T_FUNCTION
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected T_FUNCTION

 *  Resolved [KHannibal](https://wordpress.org/support/users/khannibal/)
 * (@khannibal)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/)
 * Hi Florian !
 * Your theme looks very good, I’d be glad to use it and to translate it into French.
   But every time I try to activate it (last version available so far, 1.2.3), I
   get this error :
 * `Parse error: syntax error, unexpected T_FUNCTION in /home/.../subdomains/theme/
   httpdocs/wp-content/themes/fanoe/functions.php on line 497`
 * And then I have to deactivate the theme by FTP and use the default one. Do you
   know what’s happening ? Thanks for your help ! 🙂

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

 *  [Florian Brinkmann](https://wordpress.org/support/users/webdesign-florian-brinkmann/)
 * (@webdesign-florian-brinkmann)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015241)
 * Hi,
    I will try to find the error!
 *  [Florian Brinkmann](https://wordpress.org/support/users/webdesign-florian-brinkmann/)
 * (@webdesign-florian-brinkmann)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015276)
 * Okay, I have looked around in the web and it seems, that you are using a PHP 
   Version which is to old … What version of PHP are you using?
    This is the code
   from the Error:
 *     ```
       add_action('widgets_init', function()
       {
            return register_widget('Fanoe_Social_Media_Widget');
       });
       ```
   
 * I hope we can fix the problem and it would be nice, if you can send me the french
   Translation after fixing it 🙂
 *  [Florian Brinkmann](https://wordpress.org/support/users/webdesign-florian-brinkmann/)
 * (@webdesign-florian-brinkmann)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015287)
 * Okay, maybe I have a solution.
    Try to replace the code above in the functions.
   php with the following and then upload the Theme to your site. If the problem
   is fixed then, I will change it for the next official update.
 *     ```
       // register Fanoe_Social_Media_Widget
       function register_fanoe_social_media_widget() {
           register_widget( 'Fanoe_Social_Media_Widget' );
       }
       add_action( 'widgets_init', 'register_fanoe_social_media_widget' );
       ```
   
 *  Thread Starter [KHannibal](https://wordpress.org/support/users/khannibal/)
 * (@khannibal)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015323)
 * The PHP version of the client is 5.0.90 and the server’s one is 5.1.50.
    And 
   the fix you proposed did the job, thank you ! 🙂
 * I’ll try to send you the translation files between tomorrow and Tuesday. 😉
 *  [tj.abdoullah](https://wordpress.org/support/users/tjabdoullah/)
 * (@tjabdoullah)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015441)
 * thanks a lot, it worked for me.

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

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

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

 * 5 replies
 * 3 participants
 * Last reply from: [tj.abdoullah](https://wordpress.org/support/users/tjabdoullah/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_function-8/#post-4015441)
 * Status: resolved