Skip to content

Instantly share code, notes, and snippets.

@frogstarr78
Created August 26, 2019 18:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogstarr78/943a2dcd24fa95bfb207630a5f11f9d4 to your computer and use it in GitHub Desktop.
Save frogstarr78/943a2dcd24fa95bfb207630a5f11f9d4 to your computer and use it in GitHub Desktop.
62,66c62,68
< $cacheObj = json_decode($cacheFile);
< if(isset($cacheObj->$user)){
< return $cacheObj->$user;
< }else{
< throw new Exception("User does not exist in cache_keys. Try regenerating the cache.");
---
> if ( $cacheFile ) {
> $cacheObj = json_decode($cacheFile);
> if(isset($cacheObj->$user)){
> return $cacheObj->$user;
> }else{
> throw new Exception("User does not exist in cache_keys. Try regenerating the cache.");
> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment