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

Notice: Trying to get property 'key' of non-object #552

Open
yellow1912 opened this issue Nov 30, 2020 · 0 comments
Open

Notice: Trying to get property 'key' of non-object #552

yellow1912 opened this issue Nov 30, 2020 · 0 comments

Comments

@yellow1912
Copy link

This error happens on:

  1. Symfony 4.4 latest
  2. PHP 7.4
  3. JMS TranslationBundle current master branch

The exact error is:

Trying to get property 'key' of non-object in file Translation/Extractor/File/FormExtractor.php
(I think there are 2 occurrences of this code in the same file)

if (!$item->key instanceof String_) {
                    continue;
                }

My guess is due to my code here:

[$bundles, ,] = $this->buildCache();

Not sure if it's somehow related to how the parser returns the node now? The easiest fix would be to check if $item is not null but I'm not sure if that's the correct fix.

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

No branches or pull requests

1 participant