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

Ensure $restarted in templates/language.tpl always exists #12847

Merged
merged 2 commits into from Jan 18, 2016

Conversation

Mark-H
Copy link
Collaborator

@Mark-H Mark-H commented Jan 12, 2016

What does it do ?

Makes sure the $restarted variable in templates/language.tpl always exists. If it wasn't set, it would trigger two E_NOTICE errors.

Why is it needed ?

Make sure the setup doesn't throw any E_NOTICE errors

Related issue(s)/PR(s)

#12846

This was causing 2 E_NOTICE errors being triggered when opening the setup and landing on the ?action=set step. See modxcms#12846 for details.
@Mark-H Mark-H added this to the v2.5.0-pl milestone Jan 12, 2016
@@ -37,5 +37,8 @@
if (!empty($_REQUEST['restarted'])) {
$parser->set('restarted',true);
}
else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe to simplify a little?

$parser->set('restarted', !empty($_REQUEST['restarted']));

@theboxer
Copy link
Member

@Mark-H will you please update the PR with the suggestion?

@theboxer theboxer self-assigned this Jan 18, 2016
@Mark-H
Copy link
Collaborator Author

Mark-H commented Jan 18, 2016

@theboxer Done

@theboxer theboxer merged commit 93d135c into modxcms:2.x Jan 18, 2016
@Mark-H Mark-H deleted the bug-12846 branch February 9, 2017 18:06
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

Successfully merging this pull request may close these issues.

None yet

3 participants