1. 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

Discussion in 'Resolved Bug Reports' started by Mythotical, May 16, 2013.

  1. Mythotical

    Mythotical Well-Known Member

    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
    }
     
    Adam Howard likes this.
  2. Mythotical

    Mythotical Well-Known Member

    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.
     
  3. Mythotical

    Mythotical Well-Known Member

  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    You can't check the license token.
     
  5. Mike

    Mike XenForo Developer Staff Member

    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.)
     
  6. Mythotical

    Mythotical Well-Known Member

    Thanks Mike. I will send a PM this evening. On my phone right now.
     

Share This Page