Skip to content

Fatal error when upadate logging settings #6

@vvviiiooo

Description

@vvviiiooo

$logging variable is updated in config.php file when it is an updated of loging in admin settings page, but the line "'enableSecurityLogging' => true," is deleted when saving the new settings.
My correction: update AdminController by adding the line "'enableSecurityLogging' => $formData['enableSecurityLogging'] === null ? true : false,"

public function updateLogSettings($formData)
{
    if (SessionUtil::get('user')['id'] === null) {
        Flight::redirect('/login');
    }
    $user = User::findUserById(SessionUtil::get('user')['id']);
    if ($user !== false) {
        $newConfig = [
            'enableSqlLogging' => $formData['enableSqlLogging'] === null ? false : true,
            'enableRequestLogging' => $formData['enableRequestLogging'] === null ? false : true,
            'enableAuditLogging' => $formData['enableAuditLogging'] === null ? false : true,
            'enableMailLogging' => $formData['enableMailLogging'] === null ? false : true,
            'enableSystemLogging' => $formData['enableSystemLogging'] === null ? false : true, 
			**'enableSecurityLogging' => $formData['enableSecurityLogging'] === null ? true : false,**				
        ];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions