title: Laravel 4 - does not throw that variable is undefined in one of the views
body: <p>Made testing controller:</p>
  
  <pre><code>class Home1Controller extends BaseController {
  
  
  public function __construct() {
  
      ini_set('show_errors', true);
  }
  
  public function getTest() {
  
      $data['subview'] = $this-&gt;aaa();
  
      return View::make('test.bbb', $data);
  
  }
  
  private function aaa() {
  
      for ($i=0; $i&lt;10; $i++) {
          $data['subviews'][] = $this-&gt;ccc();
      }
  
      return View::make('test.aaa', $data);
  }
  
  private function ccc() {
  
      return View::make('test.ccc');
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And the views:</p>
  
  <p>aaa.blade.php:</p>
  
  <pre><code>&lt;div&gt;
  
  aaa
  
  &lt;p&gt;throws that $a is undefined &lt;/p&gt;
  
  {{-- $a --}}
  
  @foreach ($subviews as $subview)
  
      {{ $subview }}
  
  @endforeach
  </code></pre>
  
  <p></p>
  
  <p>bbb.blade.php</p>
  
  <pre><code>&lt;style type="text/css"&gt;
   div    {
  border: 1px solid;
  padding: 1px;
  margin: 1px;
  }
  &lt;/style&gt;
  
  &lt;div&gt;
  &lt;p&gt;bbb&lt;/p&gt;
  &lt;p&gt;throws that $a is undefined&lt;/p&gt;
  {{ $subview }}
  
  
  
  {{-- $a --}}
  
  
  &lt;/div&gt;
  </code></pre>
  
  <p>ccc.blade.php:</p>
  
  <pre><code>&lt;div&gt; 
   ccc
  
   does not throw that $a is undefined
  
  {{-- $a --}}
  &lt;/div&gt;
  </code></pre>
  
  <p>Now when I uncomment variable $a in aaa or bbb views, there is standard laravel error displayed.</p>
  
  <p>But when I uncomment in ccc view - error is not displayed. It is rendered this instead:</p>
  
  <pre><code>aaa
  throws that $a is undefined
  </code></pre>
  
  <p>I was testing same technique at my other computer, and I got error displaying at all views as I expect. So why could I dont get on this computer? Where should I look at?</p>
  
  <p><strong>Edited</strong></p>
  
  <p>If I add to constructor </p>
  
  <p>ini_set('display_errors', 1);</p>
  
  <p>then one error is shown:</p>
  
  <p>Fatal error: Method Illuminate\View\View::__toString() must not throw an exception in /home/darius/repos/dashboard/app/storage/views/3b6a644a21beb63c65a709b559771162 on line 11</p>
  
  <p>and in that view line 11 was in aaa view:</p>
  
  <pre><code>    &lt;?php echo $subview; ?&gt;
  </code></pre>
  
  <p>Btw I was testing on another - linux server now, its same.</p>