• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Cannot reproduce License API Undefined Index

Mythotical

Well-known member
#1
As I have setup a cron to run every hour and every 24 hours, the tests I have conducted shows that license_token is returned but domain, domain_match, and is_valid remain as undefined index. Reproducing the task just requires decoding the returned data and using the following:
PHP:
if ($data['domain_match'] AND $data['is_valid'])
{
// Run this query
}
 

Mythotical

Well-known member
#2
Using the below works:
PHP:
if (!empty($data['is_valid']) AND !empty($data['domain_match']) AND !empty($data['license_token']))
{
// Run query
}
Figured using $data['domain'] == $user['domain'] would actually do a check against my user table since I have a custom column called domain.
 

Mike

XenForo developer
Staff member
#5
Please include details of the full request you're sending and the full, undecoded response you're receiving. I don't see how it can ever return a license_token without other fields. (You can send this through a PM if you prefer.)