Skip to content
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

SecurityAdmin - Call to a member function toMap() on null #10694

Closed
emteknetnz opened this issue Feb 20, 2023 · 1 comment
Closed

SecurityAdmin - Call to a member function toMap() on null #10694

emteknetnz opened this issue Feb 20, 2023 · 1 comment

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Feb 20, 2023

Found during beta testing

Filter SecurityAdmin by a search string, then click on one of the results

error-log.ERROR: Uncaught Exception Error: "Call to a member function toMap() on null" at /sites/mysite/releases/myrelease/vendor/silverstripe/framework/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php line 672 {"exception":"[object] (Error(code: 0): Call to a member function toMap() on null at /sites/mysite/releases/myrelease/vendor/silverstripe/framework/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php:672)"} []

This happened on a test environment, though I couldn't replicate this locally, so may have been related to the data in the test environment. There was far more test data on the test environment than on my local

GridFieldPaginator::getTemplateParameters() can return null, so we should handle this in GridFieldDetailForm_ItemRequest::getNumPages()

PRs

@GuySartorelli
Copy link
Member

PR merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants