Created
March 20, 2013 19:17
-
-
Save filp/5207588 to your computer and use it in GitHub Desktop.
Blade blows up when iterating an empty array, and for example calling a method on the placeholder variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Controller: | |
*/ | |
return View::make('foo', array( 'test' => array() )) | |
/** | |
* foo.blade.php | |
*/ | |
@foreach($test as $t) | |
$t->someMethod() | |
@endforeach |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment