From f16ef2626f1a697eb1216d572dfcf0b40173f963 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 8 Nov 2013 21:40:54 -0500 Subject: [PATCH] replaced exported value with serialized one. --- extensions/gii/Generator.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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'; } /**