occ sharing:list throws "Call to undefined function" error
还没有人认领这个 Issue。
评估
调研方向
首先,使用报告中的 PHP 和 Nextcloud 版本重现 occ sharing:list。检查 lib/Service/SharesList.php 的第 116 行和第 193 行,然后跟踪从 lib/Command/ListShares.php 第 114 行发起的调用,以确定为什么 iter\\filter() 不可用。命令在没有未定义函数错误或报告中的参数警告的情况下完成,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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 https://github.com/nextcloud/sharelisting/issues/368
The second part of the error ("An unhandled exception has been thrown") remains after that.
Any advice for a fix?
- 主要语言
- PHP
- 星标
- 20
- 派生
- 8
- 平均合并
- 7 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nextcloud/sharelisting 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
nextcloud/sharelisting#624 ·
-
occ share:list fails if orphaned shares are present可能已有人在做 @CarlSchwan 于 164 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 68/100
nextcloud/sharelisting#600 ·
-
Upgrade to NC 33可能已有人在做 @CarlSchwan 于 164 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
nextcloud/sharelisting#590 · 4 条评论 · 5 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
nextcloud/sharelisting#492 · 2 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
nextcloud/sharelisting#491 · 2 个 reaction ·
查看 nextcloud/sharelisting 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Automattic/blocks-engine#4874 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
endoflife-date/endoflife.date#11561 ·
维护者通常 1 天内回复
-
good first issue priority:low type:bug
难度 2/5 1-3 小时 新手友好度 78/100
crazy-goat/fdb-php#184 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
nextcloud/groupfolders#5218 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
nextcloud/fulltextsearch_elasticsearch#621 ·
维护者通常 1 天内回复