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

Verhindert Fehlermeldung bei nicht existenztem Key #1

Closed
wants to merge 1 commit into from

Conversation

christophboecker
Copy link
Owner

Wenn mit $dataset->getValue($key) auf einen Key zugegriffen wird, der nicht existiert, wird ein Fehler ausgeworfen (Undefined array-key). Die unschöne Meldung lässt durch ein intern vorgeschaltetes if hasValue verhindern. Da hasValue bereits eine Abfrage auf dataLoaded durchführt, enthällt die Abfrage in der getValue-Methhode.

siehe FriendsOfREDAXO/neues#94 (comment)

Wenn mit `$dataset->getValue($key)` auf einen Key zugegriffen wird, der nicht existiert, wird ein Fehler ausgeworfen (Undefined array-key). Die unschöne Meldung lässt durch ein intern vorgeschaltetes `if hasValue` verhindern. Da `hasValue` bereits eine Abfrage auf `dataLoaded` durchführt, enthällt die Abfrage in der getValue-Methhode.

siehe FriendsOfREDAXO/neues#94 (comment)
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.

1 participant