From: Stéphane Jacob Date: Tue, 18 Oct 2011 08:28:49 +0000 (+0200) Subject: Fixes misplaced assignation. X-Git-Tag: xorg/1.1.4~91 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=80cc7d28b827b1fa18382acec84b54a17b3ca989;p=platal.git Fixes misplaced assignation. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 2ca66c6..93302c9 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -482,6 +482,7 @@ class ProfileSettingHobby implements ProfileSetting public function value(ProfilePage $page, $field, $value, &$success) { + $success = true; if (is_null($value)) { $value = XDB::fetchAllAssoc('SELECT type, text, pub FROM profile_hobby @@ -491,7 +492,6 @@ class ProfileSettingHobby implements ProfileSetting if (!is_array($value)) { return array(); } - $success = true; foreach($value as $i => &$hobby) { $hobby['text'] = trim($hobby['text']); if (!$hobby['text'] ||!in_array($hobby['type'], self::$type)) {