Skip to content

Local::copyFromStorage() not compatible with OC\Files\Storage\Common::copyFromStorage #5071

@mjmunger

Description

@mjmunger

I have already fixed this in a fork, and will be making a pull request.

Steps to reproduce

  1. Upgraded from 11 to 12
  2. Server started complaining about a 500 error
  3. Logs had this in them:

PHP Fatal error: Declaration of OC\Files\Storage\Local::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) must be compatible with OC\Files\Storage\Common::copyFromStorage(OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) in /home/nextcloud/nextcloud/lib/private/Files/Storage/Local.php on line 44

Expected behaviour

It should load.

Actual behaviour

it crashes with a 500 error.

Server configuration

Operating system:
Debian 8

Web server:
Apache 2.2
Database:
MySQL

PHP version:
7.2
Nextcloud version: (see Nextcloud admin page)
12.0
Updated from an older Nextcloud/ownCloud or fresh install:
11.0.2, then 11.0.3
Where did you install Nextcloud from:
The website? Direct download.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions