title: reset() - "Strict Standards: Only variables should be passed by reference"
body: <p>I am currently moving a website over for a client. Their old host must be using an old version of PHP from what I can gather. The site is currently working on their current host. I am working to move this to a new host for them and I am getting the following error:</p>
  
  <blockquote>
    <p>PHP Strict Standards:  Only variables should be passed by reference in /home/parcelt2/core/public_html/loader.php on line 17</p>
  </blockquote>
  
  <p>Below is a section of code with line 17 marked out</p>
  
  <pre><code>$uri = parse_url($_SERVER['REQUEST_URI']);
  if (substr($uri['path'], -1, 1) == '/' &amp;&amp; !sizeof($_POST)) {
  $new_uri = substr($uri['path'], 0, -1);
  if (strlen($new_uri) &gt; 0) {
      $page = reset(explode('/', $new_uri));  //line 17
      if (!in_array($page, $exempt_requests)) {
          if (isset($uri['query']) &amp;&amp; strlen($uri['query']) &gt; 0) {
              $new_uri .= '?' . $uri['query'];
          }
          header('HTTP/1.1 301 Moved Permanently');
          header('Location: ' . $new_uri, true, 301);
          exit;
      }
  }
  }
  </code></pre>
  
  <p>Would anyone be able to provide a fix or some suggestion on how to fix this? I have tried reading other SO posts about this error but have found them hard to understand.</p>
  
  <p>Thank you</p>