diff --git a/src/TimeoutException.php b/src/TimeoutException.php index 18ea72f..6f157ce 100644 --- a/src/TimeoutException.php +++ b/src/TimeoutException.php @@ -10,6 +10,13 @@ class TimeoutException extends RuntimeException public function __construct($timeout, $message = null, $code = null, $previous = null) { + // Preserve compatibility with our former signature, but avoid invalid arguments for the parent constructor: + if ($message === null) { + $message = ''; + } + if ($code === null) { + $code = 0; + } parent::__construct($message, $code, $previous); $this->timeout = $timeout;