Title: /validate returns 500 error
Last modified: May 24, 2024

---

# /validate returns 500 error

 *  Resolved [jstaerk](https://wordpress.org/support/users/jstaerk/)
 * (@jstaerk)
 * [2 years ago](https://wordpress.org/support/topic/validate-returns-500-error/)
 * After the last update, when I have a valid license key e.g. ID-03y8XR5KKlwum5g
   and send the usual authenticated post to [https://127.0.0.1/shop/wp-json/lmfwc/v2/licenses/validate/ID-03y8XR5KKlwum5g](https://127.0.0.1/shop/wp-json/lmfwc/v2/licenses/validate/ID-03y8XR5KKlwum5g)
 * I now get a http 500 response code with
 *     ```wp-block-code
       <!--
       ErrorException: Undefined variable $activation_data in file C:\projekte\homepages\shop\wp-content\plugins\license-manager-for-woocommerce\includes\Api\V2\Licenses.php on line 885
       ```
   
 * in it’s body. If in \includes\Api\V2\Licenses.php in l. 877 I add
 *     ```wp-block-code
       $activation_data =[];
       ```
   
 *  it works again.
    -  This topic was modified 2 years ago by [jstaerk](https://wordpress.org/support/users/jstaerk/).

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

 *  Plugin Support [kidwai](https://wordpress.org/support/users/kidwai/)
 * (@kidwai)
 * [2 years ago](https://wordpress.org/support/topic/validate-returns-500-error/#post-17782566)
 * Hi [@jstaerk](https://wordpress.org/support/users/jstaerk/)
 * We appreciate your detailed report and the suggested fix. I’ll forward this information
   to our development team to ensure it is addressed in the next update. In the 
   meantime, you can apply the temporary fix you mentioned to keep your system running
   smoothly.
 * Thank you for your patience and understanding. If you have any further questions
   or need additional assistance, please open a ticket on our official website.
 * Regards,
 * WPExperts Support Team
 *  Thread Starter [jstaerk](https://wordpress.org/support/users/jstaerk/)
 * (@jstaerk)
 * [2 years ago](https://wordpress.org/support/topic/validate-returns-500-error/#post-17797881)
 * Thank you very much.
 * Please note that independently from that, I get a 500 server error when I validate**
   _in_**valid licenses
 * `[2024-06-03 06:18:17] production.ERROR: Call to a member function getId() on
   bool {"exception":"[object] (Error(code: 0): Call to a member function getId()
   on bool at /home/customer/www/foundandscan.com/public_html/dev2210/wp-content/
   plugins/license-manager-for-woocommerce/includes/Api/V2/Licenses.php:855)`
 * instead of the expected
 * { “code”: “lmfwc_rest_data_error”, “message”: “License Key: ID-0xyepxVUrjF5tki
   could not be found.”, “data”: { “status”: 404 } }
 * -> I additionally suggest to add a `if ($license!==false) {` block in l. 854
 *     ```wp-block-code
       diff Licenses.php Licenses.old.php
       854d853
       <             if ($license!==false) {
       860d858
       <                 }
       ```
   
 * to make it work again as the if (!$license) catching block is some lines below
   in the code.
 * thank you very much and kind regards
 * Jochen
 *  Plugin Support [Ibaad Ahmed Khan](https://wordpress.org/support/users/ibaad06/)
 * (@ibaad06)
 * [2 years ago](https://wordpress.org/support/topic/validate-returns-500-error/#post-17806487)
 * Dear [@jstaerk](https://wordpress.org/support/users/jstaerk/)
 * Thank you for bringing this issue to our attention, Our development team has 
   already implemented a fix. This resolution will be included in the next update.
 * Regards,
 * WPExperts Support Team

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

The topic ‘/validate returns 500 error’ is closed to new replies.

 * ![](https://ps.w.org/license-manager-for-woocommerce/assets/icon-256x256.gif?
   rev=2824216)
 * [License Manager for WooCommerce](https://wordpress.org/plugins/license-manager-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/license-manager-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/license-manager-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/license-manager-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/license-manager-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/license-manager-for-woocommerce/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Ibaad Ahmed Khan](https://wordpress.org/support/users/ibaad06/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/validate-returns-500-error/#post-17806487)
 * Status: resolved