Fixed fatal error

Cannot access parent:: when current class scope has no parent
This commit is contained in:
Jeroen De Meerleer 2019-06-20 23:14:50 +02:00
parent 7b711cff8e
commit 2b9337535b
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6

View File

@ -45,8 +45,8 @@ class Game
*/ */
public function getResult(): Gameresult public function getResult(): Gameresult
{ {
if (!is_null(parent::getResult())) { if (!is_null($this->result)) {
return parent::getResult(); return $this->result;
} }
$whiteResult = $this->getWhite()->getResult(); $whiteResult = $this->getWhite()->getResult();