Title: Syntax errors T_FUNCTION, T_PUBLIC
Last modified: August 22, 2016

---

# Syntax errors T_FUNCTION, T_PUBLIC

 *  [amyhaha](https://wordpress.org/support/users/amyhaha/)
 * (@amyhaha)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/syntax-errors-t_function-t_public/)
 * Ok the last two JetPack Updates broke my site….the previous one fixed itself 
   after a couple of hours. This one I’m taking a stab at fixing because I have 
   some content scheduled….
 * Using theme GeneratePress (possibly child theme Freelancer?), WordPress 4.1 I
   think (I did install 4.1 but had a massive error that I had to go delete some
   lines of code on, and after that it worked but kept prompting me to install 4.1….
   I have a lot more content on there now so I have to back it all up before I install
   4.1.1, just haven’t had a lot of time.)
 * Re: Jetpack, I think I’m updating to 3.4 (can’t access dashboard and don’t know
   how else to tell.)
 * I had a few errors that I think I was able to remove. But I’m stuck on this one:
 * > Parse error: syntax error, unexpected T_PUBLIC in D:\Hosting\11871272\html\
   > amyhaha\wp-content\plugins\jetpack\class.jetpack.php on line 1145
 * This is what line 1145 looks like:
 * > public function check_rest_api_compat () {
 * I deleted it (which is my standard “fix”), but then it came up with this error:
 * > call_user_func_array() expects parameter 1 to be a valid callback, class ‘Jetpack’
   > does not have a method ‘check_rest_api_compat’ in D:\Hosting\11871272\html\
   > amyhaha\wp-includes\plugin.php on line 505
 * And line 505 on that page in wp-includes looks like this:
 * > call_user_func_array($the_[‘function’], array_slice($args, 0, (int) $the_[‘
   > accepted_args’]));
 * So I deleted that, and came up with another
 * > Parse error: syntax error, unexpected T_FUNCTION, expecting T_WHILE in D:\Hosting\
   > 11871272\html\amyhaha\wp-includes\plugin.php on line 522
 * I can keep deleting stuff but that’s probably a bad idea, yeah? I don’t know 
   much about syntax etc, other than basic HTML, but in comparing other public functions
   in the same document I can’t figure out what is different. I googled “T_FUNCTION
   ERROR” and [stackoverflow](http://stackoverflow.com/questions/3657357/unexpected-t-function-error-when-using-function-array-matches)
   says this:
 * > That happens when your PHP is older than 5.3. Anonymous function support wasn’t
   > available until 5.3, so PHP won’t recognize function signatures passed as parameters
   > like that.
 * …and now I’m lost. I have no idea what that means. There is some more jibber 
   jabber as an example but it doesn’t look anything like what I’m working on, so
   I wouldn’t want to tinker too much.
 * To give you an idea of my level of experience, I’m pretty proud of myself that
   I figured out how to _access my control panel_ and _found where the errors were_.
   Pretty sure just deleting them as I did will come back to bite me later, but 
   maybe by then I’ll have enough saved to pay someone…!
 * Thanks for the help!
 * [https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 2 months ago](https://wordpress.org/support/topic/syntax-errors-t_function-t_public/#post-5932019)
 * I’m sorry to hear you’ve run into issues.
 * Could you try to update to Jetpack 3.4.1, and let me know if you continue to 
   experience issues? We fixed quite a few issues with that update, and it might
   fix your problem as well.
 * Let me know how it goes.

Viewing 1 replies (of 1 total)

The topic ‘Syntax errors T_FUNCTION, T_PUBLIC’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [call_user_func_array](https://wordpress.org/support/topic-tag/call_user_func_array/)
 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [T_FUNCTION](https://wordpress.org/support/topic-tag/t_function/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/syntax-errors-t_function-t_public/#post-5932019)
 * Status: not resolved