【问题标题】:yii-user-management Yumuser.php get() on a non-object yum_user_relationsyii-user-management Yumuser.php get() on a non-object yum_user_relations
【发布时间】:2012-09-06 08:11:39
【问题描述】:

我刚刚安装了 yii-user-management 模块,但是当我尝试通过浏览器访问它时,我得到了

致命错误:在第 368 行的 ..../modules/user/models/YumUser.php 中调用非对象的成员函数 get()

$relations = Yii::app()->cache->get('yum_user_relations');

感谢任何帮助。

【问题讨论】:

    标签: yii


    【解决方案1】:

    yii-user-management 模块似乎需要一个cache 组件才能工作。因此,在您的应用程序配置中添加缓存组件为

    'cache'=>array(
        'class'=>'CDummyCache',
    ),
    

    这里我们使用CDummyCache compponent,顾名思义,它充当一个假人。你可以用here描述的任何其他缓存组件替换它

    【讨论】:

      【解决方案2】:

      感谢@dInGd0nG。你的回答也对我有用。只是想提醒人们关注他的链接。在链接中,您将看到配置语句应添加到

      'components'=>array(
             ......
              'cache'=>array(
                  'class'=>'CDummyCache',
              ),
      )
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-12-02
        • 2019-11-05
        • 2021-11-27
        • 2019-03-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多