Fix test of global purchlogitem before using it
Merge pull request #922 from JeffPyeBrook/pr-check-purchlogitem

Fix test of global purchlogitem before using it