Commit 645fccee authored by John James Jacoby's avatar John James Jacoby

Trim the key.

parent cb8886ef
......@@ -633,11 +633,11 @@ class Flox_Licensed_Product {
* @return string
*/
protected function get_license() {
static $retval = false;
static $the_key = false;
// Only calculate this one time per object
if ( false !== $retval ) {
return $retval;
if ( false !== $the_key ) {
return $the_key;
}
// Get the license key & setup constant check
......@@ -653,7 +653,10 @@ class Flox_Licensed_Product {
$retval = get_option( $key, false );
}
return trim( $retval );
// Set the local static variable to prevent repeated calculations
$the_key = trim( $retval );
return $retval;
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment