diff --git a/.travis.yml b/.travis.yml index b7459a0..c8b8682 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - hhvm before_install: diff --git a/src/Finite/StateMachine/StateMachine.php b/src/Finite/StateMachine/StateMachine.php index 47caad8..0f4b6e1 100644 --- a/src/Finite/StateMachine/StateMachine.php +++ b/src/Finite/StateMachine/StateMachine.php @@ -223,7 +223,7 @@ public function getTransition($name) throw new Exception\TransitionException(sprintf( 'Unable to find a transition called "%s" on object "%s" with graph "%s".', $name, - get_class($this->getObject()), + ($object = $this->getObject()) ? get_class($object) : 'null', $this->getGraph() )); } @@ -242,7 +242,7 @@ public function getState($name) throw new Exception\StateException(sprintf( 'Unable to find a state called "%s" on object "%s" with graph "%s".', $name, - get_class($this->getObject()), + ($object = $this->getObject()) ? get_class($this->getObject()) : 'null', $this->getGraph() )); } @@ -307,7 +307,7 @@ protected function findInitialState() throw new Exception\StateException(sprintf( 'No initial state found on object "%s" with graph "%s".', - get_class($this->getObject()), + ($object = $this->getObject()) ? get_class($object) : 'null', $this->getGraph() )); }