diff --git a/extensions/gii/Generator.php b/extensions/gii/Generator.php index 608f685..88fd25c 100644 --- a/extensions/gii/Generator.php +++ b/extensions/gii/Generator.php @@ -193,7 +193,7 @@ abstract class Generator extends Model $attributes[] = 'template'; $path = $this->getStickyDataFile(); if (is_file($path)) { - $result = @include($path); + $result = unserialize(file_get_contents($path)); if (is_array($result)) { foreach ($stickyAttributes as $name) { if (isset($result[$name])) { @@ -218,7 +218,7 @@ abstract class Generator extends Model } $path = $this->getStickyDataFile(); @mkdir(dirname($path), 0755, true); - file_put_contents($path, "getRuntimePath() . '/gii-' . Yii::getVersion() . '/' . str_replace('\\', '-', get_class($this)) . '.php'; + return Yii::$app->getRuntimePath() . '/gii-' . Yii::getVersion() . '/' . str_replace('\\', '-', get_class($this)) . '.data'; } /**