Fusl Posted June 2, 2013 Share Posted June 2, 2013 http://www.whmcs.com/images/addons/licensingaddon.png In this code you write [...] if ($status!='expired') { die("License Expired"); [...] This means exactly: If status_of_license is not expired, exit with error "License expired" and therefor this isn't exactly correct. Instead you should use =='expired' or even better: ==='expired' /http://kvz.io/blog/2013/04/23/change-your-codebase-to-use-triple-equality/ Just sayin... And don't think "Shut up and take my money" now 0 Quote Link to comment Share on other sites More sharing options...
And then there was one les Posted June 2, 2013 Share Posted June 2, 2013 (edited) === would be better in a case where you need to check they type is correct, thats its purpose, although in this instance it makes little sense because the type is a string and to match the type must be a string anyway. Typecasting makes sense when you are dealing with values that without type casting would evaluate as the same result EG: true == 1 (true) true === 1 (false) false == 0 (true) false === 0 (false) I am not going to go into the coding itself. Edited June 2, 2013 by CDJ Hosting 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted June 5, 2013 WHMCS Support Manager Share Posted June 5, 2013 Hi, The image is just there for illustration purposes from a sales perspective, but thanks for taking the time to point it out. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.