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

Update Dao.php #15778

Closed
wants to merge 1 commit into from
Closed

Update Dao.php #15778

wants to merge 1 commit into from

Conversation

djbodya
Copy link
Contributor

@djbodya djbodya commented Aug 18, 2023

When the user has limited grants there is error when trying to search some elements in gridview. Pimcore\Model\DataObject\AbstractObject\Dao::getPermissions(): Return value must be of type ?array, bool returned. This commit fix it.

Changes in this pull request

Resolves #

Additional info

WHAT

🤖 Generated by Copilot at e2998f7

Fix a bug in getPermissions method of data objects that caused an error when no row was found. Add a null check to the fetchAssociative method in models/DataObject/AbstractObject/Dao.php.

🤖 Generated by Copilot at e2998f7

fetchAssociative
may return false; check it
autumn bug hunting

HOW

🤖 Generated by Copilot at e2998f7

  • Add null check to prevent error when fetching permissions for non-existing object (link)

When the user has limited grants there is error when trying to search some elements in gridview. Pimcore\Model\DataObject\AbstractObject\Dao::getPermissions(): Return value must be of type ?array, bool returned. This commit fix it.
@github-actions
Copy link

Review Checklist

  • Target branch (11.0 for bug fixes, others 11.x)
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

@sonarcloud
Copy link

sonarcloud bot commented Aug 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell E 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@dvesh3
Copy link
Contributor

dvesh3 commented Aug 21, 2023

Fixed by c521787 thanks!

@dvesh3 dvesh3 closed this Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants