diff --git a/src/ServiceManager.php b/src/ServiceManager.php
index <HASH>..<HASH> 100644
--- a/src/ServiceManager.php
+++ b/src/ServiceManager.php
@@ -755,7 +755,7 @@ class ServiceManager implements ServiceLocatorInterface
                 'Service with name "%s" could not be created. Reason: %s',
                 $resolvedName,
                 $exception->getMessage()
-            ), $exception->getCode(), $exception);
+            ), (int)$exception->getCode(), $exception);
         }
 
         foreach ($this->initializers as $initializer) {
bugfix PDOException return string as code, also doc say thats getCode return mixed, so we have to caste to int, to avoid FatalErrors