Skip to content

Commit

Permalink
Fix 'Trying to access array offset on value of type bool'
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Dec 19, 2019
1 parent 000dca2 commit e0e4fd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getNumericStorageId() {
* get the stored metadata of a file or folder
*
* @param string | int $file either the path of a file or folder or the file id for a file or folder
* @return ICacheEntry|false the cache entry as array of false if the file is not found in the cache
* @return ICacheEntry|false the cache entry as array or false if the file is not found in the cache
*/
public function get($file) {
if (\is_string($file) or $file == '') {
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/Cache/FileCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ protected function setUp(): void {
}

protected function tearDown(): void {
if ($this->instance) {
$this->instance->remove('hack', 'hack');
if ($this->instance->get('hack') !== null) {
$this->instance->remove('hack');
}

parent::tearDown();
Expand Down

0 comments on commit e0e4fd1

Please sign in to comment.