title: PHP Function 'return' not returning
body: <p>This is a bit of an oddity for me. PHP is my forte, and I can normally figure out any issue I encounter.</p>
  
  <p>I have a custom framework that I have been using for years. I have taken it upon myself to rewrite it, and I'm doing everything essentially the same that I was before. The problem lies in the following construct:</p>
  
  <pre><code>function ModPages_GetPage() {
      $page = ModPages_GetPageByName($_GET['page_name']);
      if($page != false) {
          include(TPL_DIR.'pages/pages.view.php');
      } else {
          ErrorMessage('Invalid Page', 'The selected page could not be found.');
      }
  }
  
  
  function ModPages_GetPageByName($page_name = null) {
      $db = new Database;
      $query = '
          SELECT *
          FROM pages
          WHERE page_name = "'.CleanStr($page_name).'"
              AND page_enabled = "yes"
          LIMIT 1
          ';
      $page = $db-&gt;GetRow($query);
  
      return $page;
  }
  </code></pre>
  
  <p>This code is being called with 'home' for the value of <code>$_GET['page_name']</code>. The call to <code>ModPages_GetPageByName()</code> is working fine, but the value of <code>$page</code> in <code>ModPages_GetPage()</code> isn't getting set. Matter of fact, any debugging statements thrown in after that call are failing to display anything.</p>
  
  <p>I have <code>display_errors</code> set to <code>on</code>, and <code>error_reporting</code> set to <code>E_ALL</code>. I get a couple notices from my Database class, but that's it.</p>
  
  <p>Running the script at a shell fails to produce any errors. When using <code>strace</code>, I do see the process spits out an 'exit_group(255)'.</p>
  
  <p>This one has me quite baffled. I could sure use some direction on this.</p>