Issue Bug Closed

#80592Scheduler->log() defines $code as string but writeLog wich expects Integer

Christian Wolff 03/31/17, 09:33 updated 10/02/18, 11:00

Description

In TYPO3\CMS\Scheduler\Scheduler the log method expect a $code to be a string.
but BackendUserAuthentication Expect its Fourth parameter to be Integer.
as BackendUserAuthentication cast the Paramete Explicitly the $code information is lost.

    /**
     * This is a utility method that writes some message to the BE Log
     * It could be expanded to write to some other log
     *
     * @param string $message The message to write to the log
     * @param int $status Status (0 = message, 1 = error)
     * @param mixed $code Key for the message
     */
    public function log($message, $status = 0, $code = 'scheduler')
    {
        // Log only if enabled
        if (!empty($this->extConf['enableBELog'])) {
            $GLOBALS['BE_USER']->writelog(4, 0, $status, $code, '[scheduler]: ' . $message, []);
        }
    }

Reviews 2