We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1755df7 commit 8d47686Copy full SHA for 8d47686
classes/Kohana/Encrypt.php
@@ -63,7 +63,13 @@ public static function factory($name = NULL)
63
// Add the "Encrypt" prefix
64
$class = 'Encrypt_'.ucfirst($driver);
65
66
+ // Create a new instance and make sure it's Kohana_Crypto
67
+ $encrypt = new $class($settings);
68
+ if ( ! $encrypt instanceof Kohana_Crypto )
69
+ {
70
+ throw new Kohana_Exception('Encryption class should implement `Kohana_Crypto` interface');
71
+ }
72
// Create a new instance
- return new $class($settings);
73
+ return $encrypt;
74
}
75
0 commit comments