Title: Parse error: syntax error, unexpected &#8216;[&#8216;
Last modified: February 7, 2017

---

# Parse error: syntax error, unexpected ‘[‘

 *  Resolved [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/)
 * When trying to activate the plugin “WP Product Feed Manager” i’m receiving following
   error message:
 * Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-product-feed-
   manager/includes/data/class-queries.php on line 493
 * Can someone assist? I’m using PHP version 5.3.3
 * Thanks in advance!
    -  This topic was modified 9 years, 4 months ago by [thbaumi](https://wordpress.org/support/users/thbaumi/).

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/page/2/?output_format=md)

 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8749374)
 * Hello thbaumi,
 * Do you use the free version of WP Product Feed Manager?
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8751375)
 * Hi Michel,
 * currently, yes. Wanted to try first before buying Premium version.
 * Regards
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8752307)
 * Ok, I also assume you’re using the latest version (1.4.3). If that’s the case,
   please download the following file:
 * [https://dl.dropboxusercontent.com/u/3129817/class-queries-thb.zip](https://dl.dropboxusercontent.com/u/3129817/class-queries-thb.zip)
 * Copy the php file in the zip file to the wp-content/plugins/wp-product-feed-manager/
   includes/data folder (overwrite the old file) and test it again.
 * Let me know if it solved the issue.
 * Best regards,
    Michel
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8753274)
 * Thanks for your help, Michel. But now i’m getting:
 * Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-product-feed-
   manager/includes/data/class-data.php on line 86
 * Best regards,
    Thomas
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8756356)
 * Ok Thomas,
 * I know what’s causing the errors, but the lines of code that cause the errors
   are usually acceptable coding practice. So either a setting on your server is
   different that we’ve encountered on other clients servers so far or you’re maybe
   using an older PHP version.
 * But anyways, I do want to make sure our code also works on servers with your 
   setting and PHP version, so I will keep solving them. My only concern is that
   it’s almost impossible for me to look through all the code and to find the same
   use of these lines. If you don’t mind I will just use you as a trail and error
   way to solve the issues.
 * I do not think there will be a lot of these errors, maybe this is even the final
   error, but please bear with me :-).
 * Please copy the content of the following file to your “wp-content/plugins/wp-
   product-feed-manager/includes/data folder”:
 * [https://dl.dropboxusercontent.com/u/3129817/class-data-thb.zip](https://dl.dropboxusercontent.com/u/3129817/class-data-thb.zip)
 * Sorry for the inconvenience, I hope this is the last one,
    Michel
    -  This reply was modified 9 years, 4 months ago by [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/).
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8756940)
 * Hey Michel,
 * thanks for putting your efforts into this. I’ll be happy to play trial and error
   with you! 🙂 It seems it goes on…
 * Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-product-feed-
   manager/includes/application/class-feed-support.php on line 201
 * Best regards,
    Thomas
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8757671)
 * I think I found a way to identify all rows that could potentially cause the error.
   So here are three files I want you to update:
 * In the wp-content/plugins/wp-product-feed-manager/includes/data folder:
    [https://dl.dropboxusercontent.com/u/3129817/class-ajax-data-thb.zip](https://dl.dropboxusercontent.com/u/3129817/class-ajax-data-thb.zip)
 * And in the wp-content/plugins/wp-product-feed-manager/includes/application folder:
   
   [https://dl.dropboxusercontent.com/u/3129817/class-feed-support-thb.zip](https://dl.dropboxusercontent.com/u/3129817/class-feed-support-thb.zip)
   and [https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb.zip](https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb.zip)
 * That might be it (i hope).
 * I do have to end my support for today, but I will be back tomorrow to continue
   supporting you if required.
 * Best regards,
    Michel
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8776171)
 * No problem, Michel. Yesterday I fell asleep, too… I already tried this morning
   but it keeps going:
 * Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-product-feed-
   manager/includes/application/class-feed-processor.php on line 477
 * Have a good day,
    Thomas
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8782618)
 * Let’s see if this is the last one.
 * This one belongs in the wp-content/plugins/wp-product-feed-manager/includes/application
   folder:
 * [https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-2.zip](https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-2.zip)
 * By the way, the next update will off course include all of these changes, so 
   a next update should be ok for you.
 * Michel
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8785557)
 * Good to know, thanks! 🙂
 * But it was not yet the last one:
 * Parse error: syntax error, unexpected ‘[‘ in /wp-content/plugins/wp-product-feed-
   manager/includes/application/class-feed-processor.php on line 466
 * Regards,
    Thomas
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8786753)
 * Thomas, Could you please look at the WooCommerce – System Status page what PHP
   version you’re using?
 * Do you have any programming knowledge? (if that’s the case I might be able to
   explain what seems to happen)
 *  Thread Starter [thbaumi](https://wordpress.org/support/users/thbaumi/)
 * (@thbaumi)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8798955)
 * Hi Michel,
    sorry, last weekend kept me busy! 🙂 Yes, i do have programming knowledge.
   Is it something you will change and include in upcoming releases? Regards, Thomas
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8800447)
 * Hi Thomas,
 * I’m pretty sure you’re using an older PHP version than 5.4 on your server.
 * Just to let you know what were facing here, as of version 5.4 it is allowed to
   write something like
 * `$var = my_function()[0];`
 * where the ‘my_function’ function would return an array and the result would be
   the first item in the my_function array. This has become a common practice for
   some time now, so I used it on a few instances in the plugin code.
 * In order to prevent the syntax error I have to change these line into something
   like:
 *     ```
       $temp = my_function();
       $var = $temp[0];
       ```
   
 * No problem by itself and I thought I would be able to find all instances of this
   by searching the code for ‘)[‘. But although I did find a few instances it now
   shows that unfortunately not all instances are found with this search. Like the
   latest error you reported, it did not show up in the search.
 * So I’m absolutely not sure how often I used it in the code. Searching manually
   through the code is an impossible task and I would probably overlook an instance
   anyway.
 * So getting it solved is only possible with the help of someone with an older 
   PHP version like you (I suspect).
 * So here is another update I would like to ask you to test out:
 * [https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-3.zip](https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-3.zip)
 * It belongs again in the wp-content/plugins/wp-product-feed-manager/includes/application
   folder.
 * Thanks for trying out!
 * Michel
 *  [kaylanrally](https://wordpress.org/support/users/kaylanrally/)
 * (@kaylanrally)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8804059)
 * Hi Guys,
 * I have the same issue. I’m trying to activate the free version and I get
 * wp-content/plugins/wp-product-feed-manager/includes/application/class-feed-processor.
   php on line 466.
 * I have tried to replace the files as suggested above but still the same.
 * PHP Version 5.6.25
 * Any ideas?
 * Thanks
    Danny
 *  Plugin Contributor [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * (@michel-jongbloed)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/#post-8804288)
 * That’s strange Danny,
 * Could you also try to download the [https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-3.zip](https://dl.dropboxusercontent.com/u/3129817/class-feed-processor-thb-3.zip)
   file and place the php file inside it in your wp-content/plugins/wp-product-feed-
   manager/includes/application/ folder?
 * Then check if the error has gone?
 * Michel

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/page/2/?output_format=md)

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

 * ![](https://ps.w.org/wp-product-feed-manager/assets/icon-256x256.png?rev=3208464)
 * [WPMR Google Feed Manager for WooCommerce – Sell on Google Merchant Center & Shopping](https://wordpress.org/plugins/wp-product-feed-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-product-feed-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-product-feed-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-product-feed-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-product-feed-manager/reviews/)

 * 18 replies
 * 3 participants
 * Last reply from: [Michel Jongbloed](https://wordpress.org/support/users/michel-jongbloed/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-189/page/2/#post-8813184)
 * Status: resolved