From b514af98137a0cb540047be9abb2920c98a176c0 Mon Sep 17 00:00:00 2001 From: Edwin Hoksberg Date: Wed, 24 Mar 2021 14:39:24 +0100 Subject: [PATCH] Add missing sprintf --- src/Spryng/SpryngRestApi/Utils.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Spryng/SpryngRestApi/Utils.php b/src/Spryng/SpryngRestApi/Utils.php index 6d6cd7d..be1ce29 100644 --- a/src/Spryng/SpryngRestApi/Utils.php +++ b/src/Spryng/SpryngRestApi/Utils.php @@ -17,10 +17,10 @@ class Utils public static function assert($expected, $actual = null) { if ($actual === null && !$expected) { - throw new ValidationException('\'%s\' cannot be null', $expected); + throw new ValidationException(sprintf('\'%s\' cannot be null', $expected)); } if (!$expected || $actual !== null && $expected !== $actual) { throw new ValidationException(sprintf('Assertion failed. Got \'%s\' but expected \'%s\'.', $actual, $expected)); } } -} \ No newline at end of file +}