From b0baeff1dcf66d09cfdb0daad6a96eab0f821284 Mon Sep 17 00:00:00 2001 From: SDekkers Date: Thu, 9 Aug 2018 21:21:10 +0200 Subject: [PATCH] Added serialization parameters to helper functions decrypt and encrypt (#25166) --- src/Illuminate/Foundation/helpers.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 944a0b560b58..a462a0ea1e98 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -372,11 +372,12 @@ function database_path($path = '') * Decrypt the given value. * * @param string $value + * @param bool $unserialize * @return mixed */ - function decrypt($value) + function decrypt($value, $unserialize = true) { - return app('encrypter')->decrypt($value); + return app('encrypter')->decrypt($value, $unserialize); } } @@ -452,11 +453,12 @@ function elixir($file, $buildDirectory = 'build') * Encrypt the given value. * * @param mixed $value + * @param bool $serialize * @return string */ - function encrypt($value) + function encrypt($value, $serialize = true) { - return app('encrypter')->encrypt($value); + return app('encrypter')->encrypt($value, $serialize); } }