-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update from 1.1.0 to 1.2.1 breaks $blade->share() #31
Comments
Here is another example of a use case: use League\Container\ServiceProvider\AbstractServiceProvider; class TemplateServiceProvider extends AbstractServiceProvider
} class PartCategories
... And even if i try to use the shared() method, to get a previously stored item, it is null class ProductDetailController extends BaseController
If I downgrade back to 1.1.0, it works again. |
I may have found the issue and started a pull request here : #37 hopefully this was the right fix and will solve our problem |
I just updated from 1.1.0 to 1.2.1, and $view->blade() no longer works.
In my middlware
// this line actually is defined in the initialization portion of my app, and is then stored in a service container. In my middleware, I grab the $blade object from the container, and call share(), and then later, in my controller, I get the $blade object from the container once again, and call make()
$blade = new Blade($config['app']['template-views'], $config['app']['template-cache']);
// hash is not empty, it is an array
$blade->share('categoryHash', $hash);
In my view:
echo (bool) is_null($categoryHash); die();
And the output is 1 (or true), indicating the value is null, when it should contain an array
This works fine in <= 1.1.0, but breaks when I updated to 1.2.1. Am I missing something?
The text was updated successfully, but these errors were encountered: