Skip to content
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

Flash sessions - deprecated getter #314

Closed
Lumeriol opened this issue Aug 15, 2023 · 0 comments
Closed

Flash sessions - deprecated getter #314

Lumeriol opened this issue Aug 15, 2023 · 0 comments

Comments

@Lumeriol
Copy link

Version: 4.0-dev

Bug Description

In Nette\Application there are direct access to flash message session via magic __get() and __set() methods, that are deprecated in Nette\Http\SessinSection and it throws User deprecated exception.

Steps To Reproduce

Show any flash message with custom message.

Possible Solution

Change this lines of code:

vendor\nette\application\src\Application\UI\Control.php :: method flashMessage()

$messages = $this->getPresenter()->getFlashSession()->$id;
// should be
$messages = $this->getPresenter()->getFlashSession()->get($id);

$this->getPresenter()->getFlashSession()->$id = $messages;
// should be
$this->getPresenter()->getFlashSession()->set($id, $messages);

vendor\nette\application\src\Bridges\ApplicationLatte\TemplateFactory.php :: method createTemplate()

? (array) $presenter->getFlashSession()->{$control->getParameterId('flash')}
// should be
? (array) $presenter->getFlashSession()->get($control->getParameterId('flash'))
@dg dg closed this as completed in e2a7ba7 Oct 5, 2023
dg added a commit that referenced this issue Oct 6, 2023
dg added a commit that referenced this issue Oct 9, 2023
dg added a commit that referenced this issue Oct 9, 2023
dg added a commit that referenced this issue Oct 9, 2023
dg added a commit that referenced this issue Nov 2, 2023
dg added a commit that referenced this issue Nov 2, 2023
dg added a commit that referenced this issue Nov 13, 2023
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Dec 15, 2023
- Url is always without user info
- Closes #314
dg added a commit that referenced this issue Feb 8, 2024
- Url is always without user info
- Closes #314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant