Created
May 28, 2010 06:57
-
-
Save tight/416854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// lib/form/BaseForm.class.php | |
/** | |
* Base project form. | |
* | |
* @package peanut | |
* @subpackage form | |
* @author Alexandre 'pocky' BALMES | |
* @version SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $ | |
*/ | |
class BaseForm extends sfFormSymfony | |
{ | |
static protected $userForm = null; | |
static protected function getUser() | |
{ | |
return self::$userForm; | |
} | |
static public function getValidUser() | |
{ | |
if (!self::$userForm instanceof sfBasicSecurityUser) | |
{ | |
throw new RuntimeException('No valid user instance available'); | |
} | |
return self::$userForm; | |
} | |
static public function setUser(sfBasicSecurityUser $user) | |
{ | |
self::$userForm = $user; | |
} | |
} |
Ton BaseForm.class.php définisait une propriété static $user (la modif de @n1k0 sur les forms / users) et sfGuardRequestForgotPasswordForm définit aussi une propriété $user (non static, mais on s'en fout). Or sfGuardRequestForgotPasswordForm étend BaseForm, d'où le conflit au niveau des propriétés
J'ai fermé le ticket correspondant grâce a toi donc merci !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS: le nom est mal choisi (
$formUser
est p'tet mieux)