-
Notifications
You must be signed in to change notification settings - Fork 142
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
Cannot access protected property Omeka\Entity\ResourceTemplateProperty::$isRequired #955
Comments
You're correct that Doctrine tries to access the already-loaded property when it does lookups for stuff that's been loaded from the database already. What version of S are you using? If you're using a Git checkout, have you run |
I'm using the |
I've added a test to be run with Travis, and it fails with the same error: https://travis-ci.org/biblibre/omeka-s/builds/246099385 |
And I just discovered that if I change the getter method |
isRequired() is not usable by Doctrine which sometimes may fail with the following error: PHP Fatal error: Cannot access protected property Omeka\Entity\ResourceTemplateProperty::$isRequired Keep isRequired() for convenience and backward compatibility for modules that might use it (fix omeka#955)
Hi,
I ran into a weird bug lately and I'm not sure how to fix it.
The error message is
This happens sometimes when using CSVImport, but I think it's not related to this module. I've been able to reproduce the problem with this script:
It seems that if the entities are already loaded, Doctrine doesn't query the database but instead filter directly from the loaded collection.
Of course, changing
Omeka\Entity\ResourceTemplateProperty::$isRequired
visibility topublic
fixes the problem, but I don't know if it's the best solution.The text was updated successfully, but these errors were encountered: