- Issue created by @jrochate
- 🇵🇹Portugal jrochate
If there is no suggestion from someone more used to PbT, I will post my own patch in a couple of days.
- 🇮🇳India dineshkumarbollu
@jrochate
Added condition to fix the issue, please review and test the patch.Thanks
- 🇵🇹Portugal jrochate
I'm sorry, but I think that's not the solution.
You would have a warning about the non existing dimension of the array.
Also I don't the real implications of having the $field_target_bundles empty processed, instead of just skipping the code when empty.
I think we must wait for someone with a better knowledge about PbT. This is an access module, we shouldn't patch it to solve basic PHP errors without knowing the implications of some patch decisions.
- First commit to issue fork.
- Merge request !45Issue #3431167: Provide an empty fallback value if the current field has no target bundles defined → (Open) created by marcoliver
- Status changed to Needs review
10 months ago 1:41pm 3 April 2024 - 🇩🇪Germany marcoliver Neuss, NRW, Germany
I have created a MR with a fix similar to what @dineshkumarbollu proposed, but also avoiding the warning @jrochate mentioned.
I believe providing an empty fallback value here in case there are no target_bundles defined is fine.
$field_target_bundles
is used for one specific check only, which we're not going to pass anyway if$field_target_bundles
has an empty value. Afterwards it is not used again.I played with the scenario a bit and the change does fix the error but does not seem to introduce any new issues.
I'd greatly appreciate it if somebody else could give the MR a quick look.