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

Fix array to string conversion warning in userOptOut #19852

Closed
heurteph-ei opened this issue Oct 12, 2022 · 6 comments · Fixed by #19858
Closed

Fix array to string conversion warning in userOptOut #19852

heurteph-ei opened this issue Oct 12, 2022 · 6 comments · Fixed by #19858
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@heurteph-ei
Copy link

Expected Behavior

No error, no warning

Current Behavior

After 4.12 update:

WARNING: /tmp/templates_c/08/086087ec6b1f49536aca0dde3949a877ff4f4f1d35c2087ab45bea9f74ddf14d.php(48): Notice - Array to string conversion - Matomo 4.12.0 - Please report this message in the Matomo forums: https://forum.matomo.org/ (please do a search first as it might have been reported already) (Module: PrivacyManager, Action: usersOptOut, In CLI mode: false)

Also (in line 48) ?

echo \Piwik\piwik_escape_filter($this->env, (isset($context["language"]) || array_key_exists("language", $context) ? $context["language"] : (function () { throw new RuntimeError('Variable "language" does not exist.', 2, $this->source); })()), "html", null, true);

Possible Solution

Fix the bug 🤣

Steps to Reproduce (for Bugs)

Module: PrivacyManager, Action: usersOptOut, In CLI mode: false?

Context

https://forum.matomo.org/t/mise-a-jour-4-12-message-pour-info-pas-bloquant/47700

Your Environment

  • Matomo Version: 4.12.0 after update
  • PHP Version:
  • Server Operating System:
  • Additionally installed plugins:
@heurteph-ei heurteph-ei added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 12, 2022
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/mise-a-jour-4-12-message-pour-info-pas-bloquant/47700/3

@sgiehl
Copy link
Member

sgiehl commented Oct 13, 2022

this might related to #19848

@bx80 bx80 self-assigned this Oct 14, 2022
@bx80 bx80 added this to the 4.12.1 milestone Oct 14, 2022
@bx80 bx80 added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Oct 14, 2022
@bx80
Copy link
Contributor

bx80 commented Oct 14, 2022

Thanks for logging this @heurteph-ei 👍 It's a quick fix, I've created a PR for 4.12.1

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/global-websites-settings-warning-libs-zend-db-statement-pdo-php-229-warning/47848/2

@justinvelluppillai justinvelluppillai changed the title Matomo 4.12.0 Array to string conversion Fix array to string conversion warning in userOptOut Oct 18, 2022
@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/global-optout-is-not-working-this-isuseroptedout-always-return-false/47834/5

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/global-optout-is-not-working-this-isuseroptedout-always-return-false/47834/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants