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

Fix 'Undefined variable' PHP notice in API REST #1455

Merged
merged 1 commit into from
Feb 3, 2019

Conversation

dregad
Copy link
Member

@dregad dregad commented Feb 1, 2019

Since the Slim Container's 'displayErrorDetails' setting is set to true
according to $t_show_detailed_errors's value, instead of referencing the
variable directly within the closure via a 'use' statement, we retrieve
the Container's settings to determine whether PHP exception details
should be shown or not.

Regression introduced by b2119ce.

Fixes #25429 (see #1280)

@dregad dregad requested a review from vboctor February 1, 2019 16:18
@atrol
Copy link
Member

atrol commented Feb 2, 2019

While you are on it, you might also want to change

$t_show_detailed_errors = ON == config_get_global( 'show_detailed_errors' );
if( $t_show_detailed_errors ) {
	$t_config['settings'] = array( 'displayErrorDetails' => true );
}

to

if( ON == config_get_global( 'show_detailed_errors' ) ) {
	$t_config['settings'] = array( 'displayErrorDetails' => true );
}

@dregad
Copy link
Member Author

dregad commented Feb 3, 2019

While you are on it, you might also want to change [...]

Good suggestion, done.

Since the Slim Container's 'displayErrorDetails' setting is set to true
according to $t_show_detailed_errors's value, instead of referencing the
variable directly within the closure via a 'use' statement, we retrieve
the Container's settings to determine whether PHP exception details
should be shown or not.

Remove $t_show_detailed_errors variable as it is no longer needed.

Regression introduced by b2119ce.

Fixes #25429
@dregad dregad merged commit af72555 into mantisbt:master Feb 3, 2019
@dregad dregad deleted the i25429-php-notice-api-rest branch February 3, 2019 13:52
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.

3 participants