Cockpit-HQ / Cockpit

Cockpit Core - Content Platform
https://getcockpit.com
Other
388 stars 47 forks source link

naming collision with `$view` in `App::render()` #146

Closed raffaelj closed 1 year ago

raffaelj commented 1 year ago

During the refactoring, the underscores were dropped. Now I can break the render method if $slots['view'] exists.

I would recommend to replace

        $render = function($view, $viewSlots) {
            \extract((array)$viewSlots);
            \ob_start();
            include $view;
            return \ob_get_clean();
        };

with

        $render = function($__view, $__viewSlots) {
            \extract((array)$__viewSlots);
            \ob_start();
            include $__view;
            return \ob_get_clean();
        };

to make it a bit more safer.

aheinze commented 1 year ago

Thanks!