diff --git a/src/Codeception/Test/Metadata.php b/src/Codeception/Test/Metadata.php index f004593382..2c140ceb68 100644 --- a/src/Codeception/Test/Metadata.php +++ b/src/Codeception/Test/Metadata.php @@ -200,7 +200,11 @@ public function setParamsFromAnnotations($annotations): void // set singular value for some params foreach (['skip', 'incomplete'] as $single) { - $this->params[$single] = empty($this->params[$single]) ? null : (string)$this->params[$single][0]; + if (empty($this->params[$single])) { + $this->params[$single] = null; + } else { + $this->params[$single] = (string)($this->params[$single][0] ?? $this->params[$single][1]); + } } }