Skip to content

Fix empty custom show/hide url excludes home route "/"#12

Merged
eug-L merged 2 commits intotawk:masterfrom
eug-L:fix/empty-custom-url
Jul 24, 2024
Merged

Fix empty custom show/hide url excludes home route "/"#12
eug-L merged 2 commits intotawk:masterfrom
eug-L:fix/empty-custom-url

Conversation

@eug-L
Copy link
Copy Markdown
Contributor

@eug-L eug-L commented Jul 22, 2024

Previous logic doesn't remove empty strings from array, causing home route to be excluded from show/hide rules

Comment thread tawk_to.admin.inc
$value = (empty($value)||!$value)?array():$value;
$jsonOpts[$column] = json_encode($value);
// split by newlines, then remove empty lines
$value = str_replace("\r", "\n", $value);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no urldecode() here because form is not serialized, actual string is posted via form action
Screenshot from 2024-07-23 16-42-21

@eug-L eug-L merged commit 9e8cb3b into tawk:master Jul 24, 2024
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