Cannot redeclare class but there are no other classes with that name
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.
精彩评论