开发者

Cannot redeclare class but there are no other classes with that name

开发者 https://www.devze.com 2022-12-29 08:20 出处:网络
I am working right now with Zend Framework and I\'ve created a Model_User_Row in app\\models\\User\\Row.php开发者_如何学运维.

I am working right now with Zend Framework and I've created a Model_User_Row in app\models\User\Row.php开发者_如何学运维.

When I try to create an instance of that class in IndexController I get an error:

Fatal error: Cannot redeclare class Model_User_Row in
F:\Projekty\www\inz\app\models\User\Row.php on line 14

14th line is a close brace.

<?php

class Model_User_Row extends Zend_Db_Table_Row
{
    /**
     * @return array
     */
    public function toArray()
    {
        $res = parent::toArray();
        unset($res['password']);
        return $res;
    }
} // #14

In my project I have no other class called Model_User_Row.

I am a bit confused - how to debug this case ?


As you are using Zend_Loader then you should check to make sure that it is configured/coded correctly and it is not attempting to load the class file multiple times then.

0

精彩评论

暂无评论...
验证码 换一张
取 消