m14t/sots — Issue #154: 500 error when no user interests are selected
Author: m14t
Created: 2011-11-14 20:01:42+00:00
State: open
Labels: Bug, High

Committed revision 362 added a fix for this, but need to ensure that it doesn't have other implications.

`svn diff -r 361:362 | mate`

Index: apps/frontend/modules/user/actions/actions.class.php
===================================================================
--- /var/folders/vg/p4p7v4q93msbk7ygq8hbwvpm0000gn/T/tempfile.3.tmp	2011-11-14 12:00:39.000000000 -0800
+++ /var/folders/vg/p4p7v4q93msbk7ygq8hbwvpm0000gn/T/tempfile.4.tmp	2011-11-14 12:00:39.000000000 -0800
@@ -119,7 +119,11 @@
$this->interest_data = new UserInterestData($this->user);

if($request->isMethod('post')) {
+ //-- TODO: @aaronhall review the need for this if statement. Was causing
+ // a 500 error when not present
+ if ( false !== $request['user_interests'] ) {
$this->interest_data->applyChanges($request['user_interests']);
+ }

$this->redirect('@thank_you');
}

If this looks ok, please remove the comment and close this ticket.