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

TMS-1009: Fix Eventz fatal error for language versions #492

Merged
merged 3 commits into from
Mar 18, 2024
Merged

Conversation

eebbi
Copy link
Contributor

@eebbi eebbi commented Mar 11, 2024

Severa-ID: 2247
Severa-kuvaus: TMS-1009 Muumimuseo.fi Liput ja aukioloajat ruotsinkielistä sivua ei pääse päivittämään
Task: https://hiondigital.atlassian.net/browse/TMS-1009

Description

Add an if-statement for fi & en languages, since Eventz throws an error with other languages.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@eebbi eebbi requested a review from a team March 11, 2024 13:26
@Liblastic Liblastic self-assigned this Mar 11, 2024
Copy link
Contributor

@Liblastic Liblastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, pieni in_array() -huomio liittyen useamman vastaavan arvon tarkasteluun.


if ( ! $response ) {
if ( ! $response && ( $lang_key === 'fi' || $lang_key === 'en' ) ) {
Copy link
Contributor

@Liblastic Liblastic Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nämä on yleensä parempi tehdä in_array():lla, niin on laajennettavissa myös kivasti myöhemmin.

Suggested change
if ( ! $response && ( $lang_key === 'fi' || $lang_key === 'en' ) ) {
$request_allowed_langs = [
'fi',
'en',
];
if (
! $response &&
in_array( $lang_key, $request_allowed_langs, true )
) {

@eebbi eebbi merged commit 4a3d6f9 into master Mar 18, 2024
1 of 2 checks passed
@eebbi eebbi deleted the TMS-1009 branch March 18, 2024 15:12
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

Successfully merging this pull request may close these issues.

2 participants