Skip to content

occ sharing:list throws "Call to undefined function" error #388

@chloesoe

Description

@chloesoe

Nextcloud 27.0.0
php-fpm: 8.2.7

Running the sharing:list command leads to an error

sudo -iu userX /opt/nextcloud/occ sharing:list
PHP Deprecated:  Optional parameter $userId declared before required parameter $filter is implicitly treated as a required parameter in /opt/nextcloud-27.0.0/nextcloud/apps/sharelisting-1.1.1/lib/Service/SharesList.php on line 193
An unhandled exception has been thrown:
Error: Call to undefined function iter\filter() in /opt/nextcloud-27.0.0/nextcloud/apps/sharelisting-1.1.1/lib/Service/SharesList.php:116
Stack trace:
#0 /opt/nextcloud-27.0.0/nextcloud/apps/sharelisting-1.1.1/lib/Service/SharesList.php(194): OCA\ShareListing\Service\SharesList->get()
#1 /opt/nextcloud-27.0.0/nextcloud/apps/sharelisting-1.1.1/lib/Command/ListShares.php(114): OCA\ShareListing\Service\SharesList->getFormattedShares()
#2 /opt/nextcloud-27.0.0/nextcloud/lib/private/User/Manager.php(632): OCA\ShareListing\Command\ListShares->OCA\ShareListing\Command\{closure}()
#3 /opt/nextcloud-27.0.0/nextcloud/apps/sharelisting-1.1.1/lib/Command/ListShares.php(113): OC\User\Manager->callForSeenUsers()
#4 /opt/nextcloud-27.0.0/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\ShareListing\Command\ListShares->execute()
#5 /opt/nextcloud-27.0.0/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#6 /opt/nextcloud-27.0.0/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#7 /opt/nextcloud-27.0.0/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#8 /opt/nextcloud-27.0.0/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#9 /opt/nextcloud-27.0.0/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#10 /opt/nextcloud-27.0.0/nextcloud/console.php(100): OC\Console\Application->run()
#11 /opt/nextcloud-27.0.0/nextcloud/occ(11): require_once('...')

The first portion of the error can be fixed with editing line 193 according to #368

The second part of the error ("An unhandled exception has been thrown") remains after that.

Any advice for a fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions