networkteam / sentry_client

TYPO3 Extension for exception logging with sentry, see http://www.getsentry.com
33 stars 36 forks source link

Exception if extension not fully configured #92

Closed georgringer closed 6 months ago

georgringer commented 7 months ago

If extension is just installed but no settings set, the following exception is thrown

Networkteam\SentryClient\Service\ConfigurationService::getReportUserInformation(): Return value must be of type string, null returned

reason is

public static function getReportUserInformation(): string
    {
        return self::getExtensionConfiguration(self::REPORT_USER_INFORMATION);
    }

suggestion: add additional ?? ''

christophlehmann commented 7 months ago

As of ext_conf_template.txt the default is userid. Since there are only 2 possible values left, the return type could also be a bool: string none/empty/unset => false, else true. A PR is welcome.