-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error accessing workflow as copyeditor #7822
Comments
I've run into it on PHP 8.0.17. |
Hrm, interesting -- I'm using 8.0.2 without trouble and Travis is using 8.0.9. More data required 🤷 |
Have you tried the reproduction steps? I think this only occurs when an ASSISTANT user without access to the production stage is assigned, and tries to access the workflow. I'm not sure if that's part of our tests. |
Yes, but I didn't see the problem on my machine (in fact, not using PHP8.1.2 either). Are you using one of the test dataset accounts? I'm using mfritz. |
I was able to reproduce this using the test dataset on
I tested using PHP's built-in server with the following command:
I'm using PHP 8.0.17.
And just in case it matters, this is what my custom display_errors = Off
error_log = /home/nate/Projects/pkp/_server/error.log
log_errors = On
# error_reporting = E_ALL
error_reporting = E_ALL ^ E_STRICT
date.timezone = Europe/London
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 10 |
So is it only a need to change this: $canAccessProduction = (bool) array_intersect($editorialWorkflowRoles, $accessibleWorkflowStages[WORKFLOW_STAGE_ID_PRODUCTION]); into this: $canAccessProduction = (bool) array_intersect($editorialWorkflowRoles, $accessibleWorkflowStages[WORKFLOW_STAGE_ID_PRODUCTION] ?? []); in a couple of places? |
Yes, I think so. |
Thanks, @NateWr and @mariuszsienkiewicz -- I've transformed your suggestion into a couple of pull requests, Mariusz:
The appropriate PR/patch should be applied in the If either of you can confirm that this resolves the issue, I can commit it! |
I can confirm this resolved the issue in |
This was actually fixed in 3.3.0-11 -- reopening that milestone temporarily to correct the record, and closing this issue. Thanks all! |
Describe the bug
When assigned as a copyeditor, I can not access the submission workflow because of a fatal error. This only effects PHP 8.0 or above because
array_intersect
is more strict about the arguments it accepts.To Reproduce
Steps to reproduce the behavior:
What application are you using?
Effects
main
andstable-3_3_0
. This fix should be backported to 3.3.0, because eventually it will need to support PHP 8.0.Additional information
The error:
The text was updated successfully, but these errors were encountered: