Merge pull request #697 from DavertMik/patch-1

A simple patch to get AspectMock and Go Aop working with Yii2
This commit is contained in:
Alexander Makarov
2013-07-31 13:24:37 -07:00

View File

@@ -120,7 +120,10 @@ class SecurityBase
static $keys; static $keys;
$keyFile = Yii::$app->getRuntimePath() . '/keys.php'; $keyFile = Yii::$app->getRuntimePath() . '/keys.php';
if ($keys === null) { if ($keys === null) {
$keys = is_file($keyFile) ? require($keyFile) : array(); $keys = array();
if (is_file($keyFile)) {
$keys = require($keyFile);
}
} }
if (!isset($keys[$name])) { if (!isset($keys[$name])) {
$keys[$name] = static::generateRandomKey($length); $keys[$name] = static::generateRandomKey($length);