* adjust for import task.

This commit is contained in:
wangyidong
2016-05-13 16:16:01 +08:00
parent 5331afa0ba
commit 0841c29336
4 changed files with 18 additions and 10 deletions
+2 -2
View File
@@ -50,9 +50,9 @@ class settingModel extends model
public function setItem($path, $value = '')
{
/* fix bug when account has dot. */
$account = $this->app->user->account;
$account = isset($this->app->user->account) ? $this->app->user->account : '';
$replace = false;
if(strpos($path, $account) === 0)
if($account and strpos($path, $account) === 0)
{
$replace = true;
$path = preg_replace("/^{$account}/", 'account', $path);