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 Warning: Undefined array keys at 1.6.0 #909

Closed
3kami3 opened this issue May 23, 2024 · 6 comments · Fixed by #919
Closed

PHP Warning: Undefined array keys at 1.6.0 #909

3kami3 opened this issue May 23, 2024 · 6 comments · Fixed by #919
Assignees
Labels
Milestone

Comments

@3kami3
Copy link

3kami3 commented May 23, 2024

I upgraded to 1.6.0 and a PHP Warning was logged.
Do I need to configure anything additional in config.inc.local.php?

[Thu May 23 21:07:31.042136 2024] [php:warn] [pid 22] [client 172.18.0.2:56836] PHP Warning:  Undefined array key "extended_error_msg" in /var/www/templates_c/286e41dd2c3e04c2d0efd05cb44c5af70eb8f2aa_2.file.index.tpl.php on line 67, referer: https://my.domain.com/index.php
[Thu May 23 21:07:31.042168 2024] [php:warn] [pid 22] [client 172.18.0.2:56836] PHP Warning:  Attempt to read property "value" on null in /var/www/templates_c/286e41dd2c3e04c2d0efd05cb44c5af70eb8f2aa_2.file.index.tpl.php on line 67, referer: https://my.domain.com/index.php
[Thu May 23 21:07:31.046295 2024] [php:warn] [pid 22] [client 172.18.0.2:56836] PHP Warning:  Undefined array key "attribute_mail_update" in /var/www/templates_c/181bd598c64907a17489511d59d14633c2561c5b_2.file.sendtoken.tpl.php on line 35, referer: https://my.domain.com/index.php
[Thu May 23 21:07:31.046313 2024] [php:warn] [pid 22] [client 172.18.0.2:56836] PHP Warning:  Attempt to read property "value" on null in /var/www/templates_c/181bd598c64907a17489511d59d14633c2561c5b_2.file.sendtoken.tpl.php on line 35, referer: https://my.domain.com/index.php
[Thu May 23 21:07:42.092700 2024] [php:warn] [pid 21] [client 172.18.0.2:51112] PHP Warning:  Undefined array key "msg_changehelpextramessage" in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43, referer: https://my.domain.com/index.php?action=sendtoken
[Thu May 23 21:07:42.092724 2024] [php:warn] [pid 21] [client 172.18.0.2:51112] PHP Warning:  Attempt to read property "value" on null in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43, referer: https://my.domain.com/index.php?action=sendtoken
  • Version: 1.6.0
  • Platform: Official Docker image
@davidcoutadeur
Copy link

Hello @3kami3

You can:

  1. verify that the config.inc.php has been updated with the last version of self-service-password
  2. empty your cache /var/www/templates_c/

@radokristof
Copy link

I observe the same error on version 1.6
Downgrading to v1.5 solves the issue.

@coudot
Copy link
Member

coudot commented Jun 12, 2024

See #912, same issue?

@radokristof
Copy link

I don't think it is the same issue. In my case errors are not visible on UI and not related to password changing.

@davidcoutadeur
Copy link

davidcoutadeur commented Jun 19, 2024

I reproduce the warnings, at least for the last two messages:

[Wed Jun 19 08:13:00.291547 2024] [php:warn] [pid 19] [client 172.17.0.1:58980] PHP Warning:  Undefined array key "msg_changehelpextramessage" in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43
[Wed Jun 19 08:13:00.291562 2024] [php:warn] [pid 19] [client 172.17.0.1:58980] PHP Warning:  Attempt to read property "value" on null in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43

These messages are visible:

  • in any distribution : tarball, docker image, or debian package
  • at least in versions 1.5.4 and 1.6.0
  • the only condition for displaying them is to have $debug = true in your configuration file. In this case, smarty complains that some variables are not initialized, which is no big deal IMO
  • since f240685, there are now many more messages in debug mode (including smarty debug messages)

I'll search for a solution for not displaying these messages, but it does not seem very important.

@davidcoutadeur
Copy link

Fix introduced in f240685 has also produced many more messages in smarty (including useless notice)

I have made a pull request to remove smarty messages (except errors) unless $smarty_debug == true. See 3d09783

This should also remove all your warnings here.

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