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

---

# Parse error: syntax error, unexpected T_CLASS

 *  Resolved [Raser8](https://wordpress.org/support/users/raser8/)
 * (@raser8)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/)
 * I wanted to make some changes in the class-main-footer.php file. After I clicked‘
   update’ I saw this:
 * **Parse error: syntax error, unexpected T_CLASS in /home/content/37/10654937/
   html/wp-content/themes/customizr/parts/class-main-footer.php on line 1**
 * I downloaded the theme again and copy-pasted the class-main-footer.php file directly
   into the corrupted file via FTP (FileZilla).
 * Is there anyone who can help me with this? Thanks a lot in advance.
 *     ```
       <?php
       /**
       * Footer actions
       *
       *
       * @package      Customizr
       * @subpackage   classes
       * @since        3.0
       * @author       Nicolas GUILLAUME <nicolas@themesandco.com>
       * @copyright    Copyright (c) 2013, Nicolas GUILLAUME
       * @link         http://themesandco.com/customizr
       * @license      http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
       */
   
       class TC_footer {
   
           function __construct () {
               add_action( '__footer'					, array( $this , 'tc_display_footer' ));
               add_action( '__credits'					, array( $this , 'tc_footer_credits' ) , 10 , 2);
   
               /*add_filter( '__credits_filter' 			,
               	array( $this , 'tc_footer_credits' ) ,
               	$priority = 10,
               	$site_credits = esc_url( home_url() ),
               	$tc_credits = '<a href="http://www.themesandco.com">Themes & Co</a>'
               );*/
           }
   
           /**
       	 * The template for displaying the footer.
       	 *
       	 * Contains footer content and the closing of the
       	 * #main-wrapper element.
       	 *
       	 * @package Customizr
       	 * @since Customizr 3.0
       	 */
           function tc_display_footer() {
           	?>
       		 <div class="colophon">
   
       		 	<div class="container">
   
       		 		<div class="row-fluid">
   
       				     <div class="span4 social-block pull-left">
       				     	<?php do_action( '__social' , 'tc_social_in_footer' ); ?>
       				     </div>
   
       			        <?php do_action ('__credits' ); ?>
   
       			        <div class="span4 backtop">
   
       			        	<p class="pull-right">
       			        		<a href="#"><?php _e( 'Back to top' , 'customizr' ) ?></a>
       			        	</p>
   
       			        </div>
   
             			</div><!-- .row-fluid -->
   
             		</div><!-- .container -->
   
             	</div><!-- .colophon -->
           	<?php
           }
   
           /**
       	 * Footer Credits call back functions
       	 * Can be filtered using the $site_credits, $tc_credits parameters
       	 *
       	 *
       	 * @package Customizr
       	 * @since Customizr 3.0.6
       	 */
           function tc_footer_credits( $site_credits = null, $tc_credits = null ) {
           	?>
           	<div class="span4 credits">
       	    	<?php
       		    	$credits =  sprintf( '<p> &middot; &copy; %1$s <a href="%2$s" title="%3$s" rel="bookmark">%3$s</a> &middot; Designed by %4$s &middot;</p>',
       					    esc_attr( date( 'Y' ) ),
       					    esc_url( home_url() ),
       					    esc_attr(get_bloginfo()),
       					    '<a href="http://www.themesandco.com">Themes & Co</a>'
       				);
       				echo apply_filters( 'footer_credits', $credits );
       			?>
       		</div>
       		<?php
           }
   
        }//end of class
       ```
   

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

 *  [rdellconsulting](https://wordpress.org/support/users/rdellconsulting/)
 * (@rdellconsulting)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010211)
 * It’s not in the original, but you could try to close the <?php tag with `?>`.
   Might work.
 *  Thread Starter [Raser8](https://wordpress.org/support/users/raser8/)
 * (@raser8)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010222)
 * Thanks for your reply rdell. I tried that but it didn’t work either.
 * Do you have any other advice?
 *  [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * (@electricfeet)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010269)
 * Did you leave any blanks at the beginning or the end? I understand php is fussy.
   And this is the _only_ thing I understand about php 🙂
 *  Thread Starter [Raser8](https://wordpress.org/support/users/raser8/)
 * (@raser8)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010273)
 * Ah fixed it.
 * I put a space after `<?php` and that worked.
 *  Thread Starter [Raser8](https://wordpress.org/support/users/raser8/)
 * (@raser8)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010276)
 * Thanks Electric for your help. There was no blank behind `<?php`.
 *  [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * (@electricfeet)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010283)
 * Nice to know the one thing that I know about php–that it’s fussy about spaces–
   was correct, though 🙂

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

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

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

## Tags

 * [Unexpected](https://wordpress.org/support/topic-tag/unexpected/)

 * 6 replies
 * 3 participants
 * Last reply from: [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_class/#post-4010283)
 * Status: resolved