Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -19,6 +19,7 @@ use IPS\Db;
use IPS\IPS;
use IPS\nexus\Purchase;
use IPS\Patterns\ActiveRecord;
use OutOfRangeException;
use function count;
use function defined;
use function get_class;
@@ -97,7 +98,13 @@ abstract class LicenseKey extends ActiveRecord
public static function constructFromData( array $data, bool $updateMultitonStoreIfExists = TRUE ): static
{
$types = static::licenseKeyTypes();
$classname = $types[ IPS::mb_ucfirst( $data['lkey_type'] ) ];
$licenseKeyType = IPS::mb_ucfirst( $data['lkey_type'] );
if( !array_key_exists( $licenseKeyType, $types ) )
{
throw new OutOfRangeException;
}
$classname = $types[ $licenseKeyType ];
/* Initiate an object */
$obj = new $classname;