Title: unexpected T_STRING
Last modified: May 8, 2018

---

# unexpected T_STRING

 *  Resolved [nemanteo](https://wordpress.org/support/users/nemanteo/)
 * (@nemanteo)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/unexpected-t_string-8/)
 * I have just bought a theme that requires LearnPress and LearnPress – Course Review
   plugins. The latter activated successfully but LearnPress throws an error “unexpected
   T_STRING in lp-core-functions.php on line 2269”.
 * I’m guessing that the problem might be with the version of Appache server or 
   SQL database. The appache is 2.4.33 and MySQL 5.6.39-cll-lve.
 * Could older version of LearnPress solve the problem?
 * Best,
    Nemanja
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funexpected-t_string-8%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [Ken Nguyen](https://wordpress.org/support/users/kendy73/)
 * (@kendy73)
 * [8 years ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10293528)
 * Hi Nemanja,
 * Please make sure your site is using PHP 5.6 or higher.
 * Let me know.
 *  Thread Starter [nemanteo](https://wordpress.org/support/users/nemanteo/)
 * (@nemanteo)
 * [8 years ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10306208)
 * Hi Ken,
 * It’s still not working, with PHP 5.6.30.
 * The error is in lp-core-functions.php, on the following line:
    add_action( ‘init’,
   function () { learn_press_get_current_profile_tab();
 * I’ve tried updating the user profile with some basic info, but nothing changed.
 * Thanks in advance for your help.
 *  Thread Starter [nemanteo](https://wordpress.org/support/users/nemanteo/)
 * (@nemanteo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10409150)
 * Hi Ken,
 * It’s been almost a month and no solution. I’ve been busy so I just updated the
   plugin hoping that it will fix the problem, but I still get the same error. Syntax
   error, unexpected T_FUNCTION on the following line:
 *     ```
       add_action( 'init', function () {
       	learn_press_get_current_profile_tab();
       ```
   
 * Can you please help me, I need to set this up quickly?
    -  This reply was modified 7 years, 11 months ago by [nemanteo](https://wordpress.org/support/users/nemanteo/).
 *  Plugin Contributor [Ken Nguyen](https://wordpress.org/support/users/kendy73/)
 * (@kendy73)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10413088)
 * add_action( ‘init’, function () {
    learn_press_get_current_profile_tab(); } );
 * Hi nemanteo,
 * So sorry for the inconvenience.
 * Please replace this code
 *     ```
       add_action( 'init', function () {
       	learn_press_get_current_profile_tab();
       } );
       ```
   
 * with this one
 * `add_action( 'init', 'learn_press_get_current_profile_tab' );`
 * Try and let me know.
 *  Thread Starter [nemanteo](https://wordpress.org/support/users/nemanteo/)
 * (@nemanteo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10451512)
 * Hi Ken,
 * Thanks for the quick response. Unfortunately I didn’t have time to test it before
   so, this part works, but now I get another error. 🙁
 * Fatal error: Class ‘/home/englishc/public_html/test/wp-content/plugins/learnpress/
   inc/background-process/class-lp-background-query-items.php’ not found in /home/
   englishc/public_html/test/wp-content/plugins/learnpress/inc/abstracts/abstract-
   background-process.php on line 128
 * And the line in question is `self::$instances[ $name ] = new $name();`
 * Thank you again for your help.
 *  Thread Starter [nemanteo](https://wordpress.org/support/users/nemanteo/)
 * (@nemanteo)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10452030)
 * Hi Ken,
 * Sorry for this misunderstanding. Actually, I’ve just realized that the problem
   was with the version of PHP. Server shows 5.6 but it actually was 5.2 (found 
   out via a WP plugin). Learnpress activated without problem now.
 * Thanks for your support and again sorry for the confusion.
 *  Plugin Contributor [Ken Nguyen](https://wordpress.org/support/users/kendy73/)
 * (@kendy73)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10453266)
 * 5.2 is too old 🙂
 * Just get the 5.6 or higher, it will be better for your website 😉

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

The topic ‘unexpected T_STRING’ is closed to new replies.

 * ![](https://ps.w.org/learnpress/assets/icon-256x256.gif?rev=3254420)
 * [LearnPress - WordPress LMS Plugin for Create and Sell Online Courses](https://wordpress.org/plugins/learnpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/learnpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/learnpress/)
 * [Active Topics](https://wordpress.org/support/plugin/learnpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/learnpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/learnpress/reviews/)

## Tags

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

 * 7 replies
 * 2 participants
 * Last reply from: [Ken Nguyen](https://wordpress.org/support/users/kendy73/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/unexpected-t_string-8/#post-10453266)
 * Status: resolved