#1546: I18n and Zend 1.6 with autoload not compatible
-------------------------------------+--------------------------------------
 Reporter:  rekam                    |       Owner:  romanb
     Type:  defect                   |      Status:  new   
 Priority:  blocker                  |   Milestone:        
Component:  Record                   |     Version:  1.0.2 
 Keywords:  i18n zend load autoload  |    Has_test:  0     
 Mystatus:  Pending Core Response    |   Has_patch:  1     
-------------------------------------+--------------------------------------
 There is an issue with I18n, when using it with Zend 1.6 and active Zend's
 autoload.

 After digging a little, I found the problem in the
 Doctrine_Record_Generator. There's a call to class_exists() function. If
 class doesn't exists, it calls the autoload function. In case of I18n, if
 you have a class named "Stuff", it will make Doctrine_Record_Generator to
 verify if "StuffTranslation" exists. And of course, it doesn't exists. So
 Zend yells a warning.

 I simply added "false" as a second parameter to class_exists(), so
 autoload isn't called. I don't know if there will be side effects. But in
 my case, everything's fine with it.



 {{{
 141 public function initialize(Doctrine_Table $table)
 142 ...
 159 // check that class doesn't exist (otherwise we cannot create it)
 160 - if ($this->_options['generateFiles'] === false &&
 class_exists($this->_options['className'])) {

 160 + if ($this->_options['generateFiles'] === false &&
 class_exists($this->_options['className'], false)) {

 161     return false;
 162 }
 163 ...
 }}}

 Hope it helps, thanks
 Rekam

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1546>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to