Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix for array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /htdocs/Ip/Internal/Translations/JsonLoader.php:48 #903

Open
HeinOpal opened this issue Jul 18, 2022 · 0 comments

Comments

@HeinOpal
Copy link

Thank you @unyfolk for this fix

$textDomain = new TextDomain($messages);

->> if (array_key_exists('', $textDomain)) {
if (isset($textDomain['']['plural_forms'])) {
$textDomain->setPluralRule(
PluralRule::fromString($textDomain['']['plural_forms'])
);
}

$textDomain = new TextDomain($messages);
--> if (isset($textDomain[''])) {
if (isset($textDomain['']['plural_forms'])) {
$textDomain->setPluralRule(
PluralRule::fromString($textDomain['']['plural_forms'])
);
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant