pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 442 forks source link

Fatal error at reset permissions #8789

Closed jonasraoni closed 1 year ago

jonasraoni commented 1 year ago

Describe the bug A fatal error happens when trying to reset the permissions.

PHP Fatal error:  Uncaught BadMethodCallException: Method Illuminate\\Support\\LazyCollection::next does not exist. in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php:113
Stack trace:
#0 /var/www/html/lib/pkp/classes/submission/Repository.php(669): Illuminate\\Support\\LazyCollection->__call('next', Array)
#1 /var/www/html/lib/pkp/pages/management/PKPToolsHandler.php(142): PKP\\submission\\Repository->resetPermissions(1)
#2 /var/www/html/lib/pkp/pages/management/PKPToolsHandler.php(63): PKP\\pages\\management\\PKPToolsHandler->resetPermissions(Array, Object(APP\\core\\Request))
#3 [internal function]: PKP\\pages\\management\\PKPToolsHandler->tools(Array, Object(APP\\core\\Request))
#4 /var/www/html/lib/pkp/classes/core/PKPRouter.php(465): call_user_func(Array, Array, Object(APP\\core\\Request))
#5 /var/www/html/lib/pkp/classes/core/PKPPageRouter.php(308): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(APP\\core\\Request), Array, false)
#6 /var/www/html/lib/pkp/classes/core/Dispatcher.php(163): PKP\\core\\PKPPageRouter->route(Object(APP\\core\\Request))
#7 /var/www/html/lib/pkp/classes/core/PKPApplication.php(372): PKP\\core\\Dispatcher->dispatch(Object(APP\\core\\Request))
#8 /var/www/html/index.php(21): PKP\\core\\PKPApplication->execute()
#9 {main}
  thrown in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Macroable/Traits/Macroable.php on line 113, referer: https://omp.testing.publicknowledgeproject.org/

To Reproduce

  1. Access the Tools > Permissions
  2. Attempt to reset the permissions

What application are you using? OMP 3.4.0rc1

PRs

jonasraoni commented 1 year ago

@asmecher PRs

asmecher commented 1 year ago

Merged, thanks!