非静态方法 UFactory::getModuleAlias() 不应静态调用 Uniprogy Yii

问题描述 投票:0回答:1

我已经迁移了我的应用程序,但非静态方法有问题:

Error 500
Non-static method UFactory::getModuleAlias() should not be called statically

我已将调试更改为true:

defined('YII_DEBUG') or define('YII_DEBUG',true);

然后我得到一个错误

不应调用非静态方法 UFactory::getModuleAlias() 静态

/home/tradertrga/www/_CRM/framework/uniprogy/framework/base/UFactory.php(88)

076             
077             $alias = '.'.rtrim($alias,'.');
078             $paths = explode('.',substr($alias,0,strrpos($alias,'.')));
079             $itemName = substr($alias,strrpos($alias,'.')+1);
080             
081             $className = '';
082             
083             $id = explode('/',$module->getId());
084             $id = implode('',array_map('ucfirst',$id));
085             $className = $id . $className;
086             
087             $path = 'application.modules.'
088                 . str_replace('.','.modules.',self::getModuleAlias($module)).'.'.$type;
089             if(count($paths))
090             {
091                 $path.= implode('.', $paths);
092                 $className.= implode('', array_map('ucfirst',$paths));
093             }
094             $letter = strtoupper(substr($type,0,1));
095             $path.= '.'.$letter.$className.ucfirst($itemName);
096             
097             self::saveToCache($key,array('module' => self::getModuleAlias($module),
098                 'path' => $path));
099         }
php yii static-methods
1个回答
1
投票

你好,

我只通过在index.php中添加这行代码就解决了这个问题。

error_reporting(E_NONE);

谢谢你

© www.soinside.com 2019 - 2024. All rights reserved.