Skip to content

System setting error_log_filepath ignored in getLogPath #32

Description

@verstratenbram

Setting the error log path to a custom value is ignored by the getLogPath function.

For example
error_log_filepath: {core_path}logs/

Original:

protected function getLogPath($filename = '')
{
    return $this->modx->getOption(xPDO::OPT_CACHE_PATH) . xPDOCacheManager::LOG_DIR . basename($filename);
}

Fixed:

protected function getLogPath($filename = '')
{
    return $this->modx->getOption('error_log_filepath', null, $this->modx->getOption(xPDO::OPT_CACHE_PATH) . xPDOCacheManager::LOG_DIR, true) . basename($filename);
}

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