Title: syntax error
Last modified: August 31, 2016

---

# syntax error

 *  Resolved [6424515](https://wordpress.org/support/users/6424515-1/)
 * (@6424515-1)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/)
 * Hi, I installed “string locator” but when activating I got the following message:
   
   Parse error: syntax error, unexpected ‘[‘ in /home/content/71/12127071/html/wp-
   content/plugins/string-locator/string-locator.php on line 400 Many thanks in 
   advance for your help. Best regards, Lars
 * [https://wordpress.org/plugins/string-locator/](https://wordpress.org/plugins/string-locator/)

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

 *  Plugin Author [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * (@clorith)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074426)
 * Hi,
 * Could you share some details with me, do you happen to know what PHP version 
   you are running ?
 *  Thread Starter [6424515](https://wordpress.org/support/users/6424515-1/)
 * (@6424515-1)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074437)
 * ..hm, unfortunately not. Trying to locate this…
 *  Thread Starter [6424515](https://wordpress.org/support/users/6424515-1/)
 * (@6424515-1)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074439)
 * Got it: 5.3.24
 *  Plugin Author [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * (@clorith)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074516)
 * Not quite sure why you are getting this notice then.
 * Are you comfortable making edits to that file?
 * If you are, replace the code on line 400, it currently looks like this:
 *     ```
       $data['path'] = WP_CONTENT_DIR . '/plugins/' . explode( '/', substr( $option, 2 ) )[0];
       ```
   
 * With the following:
 *     ```
       $slug_grab = explode( '/', substr( $option, 2 ) );
       $data['path'] = WP_CONTENT_DIR . '/plugins/' . $slug_grab[0];
       ```
   
 *  Thread Starter [6424515](https://wordpress.org/support/users/6424515-1/)
 * (@6424515-1)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074538)
 * …many thanks for your help, but I do not know how to find line 400 🙂
    I will
   just let it go. All the best, Lars.
 *  Plugin Author [Marius L. J.](https://wordpress.org/support/users/clorith/)
 * (@clorith)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074580)
 * Hi,
 * I hunted down some more PHP versions to do some more extensive testing, and you
   are correct that the version you are on would throw a notice here.
 * I’m patching that up as we speak to account for this case as well 🙂
 *  Thread Starter [6424515](https://wordpress.org/support/users/6424515-1/)
 * (@6424515-1)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074622)
 * Thank you Marius! Thats awesome!!!

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

The topic ‘syntax error’ is closed to new replies.

 * ![](https://ps.w.org/string-locator/assets/icon-256x256.png?rev=1352230)
 * [String locator](https://wordpress.org/plugins/string-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/string-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/string-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/string-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/string-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/string-locator/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [6424515](https://wordpress.org/support/users/6424515-1/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/syntax-error-130/#post-7074622)
 * Status: resolved