title: Undefined index PHP Error/Warning
body: <p>I am getting the following error on a PHP &amp; MySQL application from Joomla and Jomsocial: </p>
  
  <pre><code>[05-Apr-2013 12:23:45 America/Denver] PHP Notice:  Undefined index: query in /home2
  /robervl4/public_html/forum/components/com_community/community.php on line 50
  </code></pre>
  
  <p>This did not work out of the box. The application displays products from a database as it should, the only problem is I get this error.</p>
  
  <p>Here is the PHP code of the file, with line 50 being:</p>
  
  <pre><code>parse_str($parts['query'], $qstring);
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>// DISABLE FORMAT=FEED for now 17Jan13 as requested by Fuqaha
  $mainframe  = JFactory::getApplication();
  $jinput     = $mainframe-&gt;input;
  $viewType = $jinput-&gt;request-&gt;get('format', 'html','NONE');
  if(strtolower($viewType)=='feed') {
  $u = JFactory::getURI();
  $parts = parse_url($u-&gt;toString());
  parse_str($parts['query'], $qstring);
  unset($qstring['format']);
  $parts['query'] = http_build_query($qstring) ;
  
  //recompose the URL to redirect
  $scheme   = isset($parts['scheme']) ? $parts['scheme'] . '://' : ''; 
  $host     = isset($parts['host']) ? $parts['host'] : ''; 
  $port     = isset($parts['port']) ? ':' . $parts['port'] : ''; 
  $path     = isset($parts['path']) ? $parts['path'] : ''; 
  $query    = isset($parts['query']) ? '?' . $parts['query'] : ''; 
  $fragment = isset($parts['fragment']) ? '#' . $parts['fragment'] : ''; 
  
  $mainframe-&gt;redirect(CRoute::_("$scheme$host$port$path$query$fragment"));
  exit('Redirecting to Non-Feed page');
  }
  </code></pre>