From cf010b81da2ca8faca65fc312773e5dd5f64c641 Mon Sep 17 00:00:00 2001 From: Alban Date: Thu, 14 Sep 2017 15:26:30 +0200 Subject: [PATCH] cast code on exception with labels --- src/Rxnet/Exceptions/ExceptionWithLabels.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Rxnet/Exceptions/ExceptionWithLabels.php b/src/Rxnet/Exceptions/ExceptionWithLabels.php index 293e1ff..75f4305 100644 --- a/src/Rxnet/Exceptions/ExceptionWithLabels.php +++ b/src/Rxnet/Exceptions/ExceptionWithLabels.php @@ -15,10 +15,10 @@ public function __construct($message, $labels = [], \Exception $previous = null) var_dump($labels); die; } - $code = Arrays::get($labels, 'code', 500); + $code = (int) Arrays::get($labels, 'code', 500); if($previous) { $message.= ' > '.$previous->getMessage(); } parent::__construct($message, $code, $previous); } -} \ No newline at end of file +}