diff --git a/lib/private/Image.php b/lib/private/Image.php index eb5812c8785..7e6a7621dcf 100644 --- a/lib/private/Image.php +++ b/lib/private/Image.php @@ -1137,9 +1137,6 @@ class Image implements IImage { * Destroys the current image and resets the object */ public function destroy(): void { - if ($this->valid()) { - imagedestroy($this->resource); - } $this->resource = false; } diff --git a/tests/lib/Files/Mount/RootMountProviderTest.php b/tests/lib/Files/Mount/RootMountProviderTest.php index fedd62d5663..70a02dbce47 100644 --- a/tests/lib/Files/Mount/RootMountProviderTest.php +++ b/tests/lib/Files/Mount/RootMountProviderTest.php @@ -117,7 +117,6 @@ class RootMountProviderTest extends TestCase { $class = new \ReflectionClass($storage); $prop = $class->getProperty('objectStore'); - $prop->setAccessible(true); /** @var S3 $objectStore */ $objectStore = $prop->getValue($storage); $this->assertEquals('nextcloud0', $objectStore->getBucket()); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 274f8cb6d09..16562cee7d2 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -1539,7 +1539,6 @@ class ViewTest extends \Test\TestCase { public function testHookPaths($root, $path, $shouldEmit): void { $filesystemReflection = new \ReflectionClass(Filesystem::class); $defaultRootValue = $filesystemReflection->getProperty('defaultInstance'); - $defaultRootValue->setAccessible(true); $oldRoot = $defaultRootValue->getValue(); $defaultView = new View('/foo/files'); $defaultRootValue->setValue(null, $defaultView);