From 2b9337535b2b8ed9a770d57bc1716bf7840b8143 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Thu, 20 Jun 2019 23:14:50 +0200 Subject: [PATCH] Fixed fatal error Cannot access parent:: when current class scope has no parent --- src/Game.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Game.php b/src/Game.php index 28c01f4..4023c80 100644 --- a/src/Game.php +++ b/src/Game.php @@ -45,8 +45,8 @@ class Game */ public function getResult(): Gameresult { - if (!is_null(parent::getResult())) { - return parent::getResult(); + if (!is_null($this->result)) { + return $this->result; } $whiteResult = $this->getWhite()->getResult();