Skip to content

Commit

Permalink
Hotfix cache_get_or_add()
Browse files Browse the repository at this point in the history
  • Loading branch information
repat committed Apr 9, 2019
1 parent d4d3656 commit 286ac91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ extract_inline_img("<img src='data:image/jpeg;base64,...>", '/var/www/htdocs/lar
* MIT, see [LICENSE](https://github.com/repat/laravel-helper/blob/master/LICENSE)
## Version
* Version 0.1.19.1
* Version 0.1.20
## Contact
#### repat
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["laravel", "helper", "files", "array", "database", "strings", "date"],
"homepage": "http://repat.de",
"license": "MIT",
"version" : "0.1.19.1",
"version" : "0.1.20",
"authors": [
{"name": "repat", "email": "repat@repat.de"}
],
Expand Down
4 changes: 2 additions & 2 deletions src/object_helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ function object2array($stdClassObject) : array
*/
function cache_get_or_add(string $key, callable $function)
{
$result = Cache::get($key, $function);
Cache::add($result);
$result = \Cache::get($key, $function);
\Cache::add($key, $result);
return $result;
}
}

0 comments on commit 286ac91

Please sign in to comment.