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

PHP Notice: Undefined index: found_formatted in languages.php #546

Closed
slaFFik opened this issue Oct 12, 2020 · 7 comments
Closed

PHP Notice: Undefined index: found_formatted in languages.php #546

slaFFik opened this issue Oct 12, 2020 · 7 comments

Comments

@slaFFik
Copy link

slaFFik commented Oct 12, 2020

Got this PHP notice:

PHP Notice:  Undefined index: found_formatted in ...\wp-content\plugins\query-monitor\output\html\languages.php on line 85

Unfortunately, I wasn't able to catch it earlier to provide steps.
I was testing plugin loading its own translations properly when site language != user language inside WordPress.

@johnbillion
Copy link
Owner

Thanks for the report. I think this can happen when a plugin loads its translations too early, eg. before the init hook. I'll do some testing.

@ocean90
Copy link
Contributor

ocean90 commented Jan 22, 2021

I'm seeing the same notice in combination with Yoast SEO and the Preferred Languages plugin:

Bildschirmfoto 2021-01-22 um 13 07 55

The first two are not found, the last one is so $mofile['found'] is true.

@johnbillion
Copy link
Owner

Thanks! That's a big help.

@glagonikas
Copy link
Contributor

We too see quite a lot of those notices on our logs. Can't we just suppress them in the code by adding an isset()?

@johnbillion johnbillion added this to the 3.10.0 milestone Sep 9, 2022
@johnbillion
Copy link
Owner

johnbillion commented Sep 9, 2022

This should be fixed in 3.10, the property is no longer used.

@idejniprojekt
Copy link

I have same problem too: PHP Notice: Undefined index: line in .../wp-content/plugins/query-monitor/output/html/languages.php on line 126

Any suggestion?

@johnbillion
Copy link
Owner

@idejniprojekt That's a different error message. Can you let me know which plugins you're using on your site? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants