Framework: Blade Extends Loop

Created on 11 Jul 2020  路  2Comments  路  Source: laravel/framework


  • Laravel Version: 7.16.1
  • PHP Version: 7.4.3
  • Database Driver & Version: MySQL 8.0.20
  • Ubuntu 20.04 (Idk if it's important)

Description:

There's a little bug with Laravel Blade when you extends the blade components in itself, It makes the computer freeze(In my case) and to back to normal needs to unplug from the energy source.

Steps To Reproduce:

Please Be Careful this just froze my laptop(kinda old but it still works).

  1. Create a Route just to render a blade view:
Route::get('/', function () {
    /* This will render a file in:
    * /foo/bar/laravel-project/resources/views/test.blade.php
    */
    return response()->view('test');
});
  1. Then create the test.blade.php file
    @extends('test')
  2. Then access you this route on your browser, FYI I'd tried to test this by accessing it on my cellphone with help of nGrok, and it still froze my computer.

Most helpful comment

Because you are extending current blade component and occurs infinite loop.

This is not bug, this is a your unreasonable coding.

Don't make infinite loop, this is your coding mistake.

All 2 comments

Because you are extending current blade component and occurs infinite loop.

This is not bug, this is a your unreasonable coding.

Don't make infinite loop, this is your coding mistake.

Do you _not_ have a memory limit?

Was this page helpful?
0 / 5 - 0 ratings