Constant C3_CODECOVERAGE_MEDIATE_STORAGE can be used before it's defined
- 主要语言
- PHP
- 星标
- 73
- 派生
- 46
- PR 合并指标
- 30 天内没有已合并 PR
描述
If these lines fail:
```php
try {
\Codeception\Configuration::config($config_file);
} catch (\Exception $e) {
__c3_error($e->getMessage());
}
```
due to `\Codeception\Configuration` not existing, then
```php
$errorLogFile = defined('C3_CODECOVERAGE_ERROR_LOG_FILE') ?
C3_CODECOVERAGE_ERROR_LOG_FILE :
C3_CODECOVERAGE_MEDIATE_STORAGE . DIRECTORY_SEPARATOR . 'error.txt';
```
is called before
```php
define('C3_CODECOVERAGE_MEDIATE_STORAGE', Codeception\Configuration::logDir() . 'c3tmp');
define('C3_CODECOVERAGE_PROJECT_ROOT', Codeception\Configuration::projectDir());
define('C3_CODECOVERAGE_TESTNAME', $_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE']);
```
is run.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Locate the __c3_error handler and the code that defines C3_CODECOVERAGE_MEDIATE_STORAGE, then trace the failure path when Codeception\Configuration is unavailable. Reproduce that path and ensure the error-log fallback does not use the constant before it is defined.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- testing
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100