diff --git a/system/Config/DotEnv.php b/system/Config/DotEnv.php
index <HASH>..<HASH> 100644
--- a/system/Config/DotEnv.php
+++ b/system/Config/DotEnv.php
@@ -183,7 +183,7 @@ class DotEnv
 		$value = $this->resolveNestedVariables($value);
 
 		// Handle hex2bin prefix
-		if ($name === 'encryption.key' && substr($value, 0, 8) === 'hex2bin:')
+              if ($name === 'encryption.key' && strpos($value, 'hex2bin:') === 0)
 		{
 			$value = hex2bin(substr($value, 8));
 		}
Update system/Config/DotEnv.php