Skip to content

Commit

Permalink
Throw invalid argument exception from cache helper (#40287)
Browse files Browse the repository at this point in the history
  • Loading branch information
axlon authored Jan 7, 2022
1 parent 281ed58 commit bb4035b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function broadcast($event = null)
* @param dynamic key|key,default|data,expiration|null
* @return mixed|\Illuminate\Cache\CacheManager
*
* @throws \Exception
* @throws \InvalidArgumentException
*/
function cache()
{
Expand All @@ -243,7 +243,7 @@ function cache()
}

if (! is_array($arguments[0])) {
throw new Exception(
throw new InvalidArgumentException(
'When setting a value in the cache, you must pass an array of key / value pairs.'
);
}
Expand Down

0 comments on commit bb4035b

Please sign in to comment.