Skip to content

Commit

Permalink
Fixed a bug that could occur when Craft generated URLs with multi-byt…
Browse files Browse the repository at this point in the history
…e characters in the query string.
  • Loading branch information
angrybrad committed May 10, 2019
1 parent bdfd602 commit ef349e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixed a bug where Craft wasn’t removing newline characters when pasting text into some single-line Table column types.
- Fixed a bug where project config syncing could have inconsistent results on load-balanced environments. ([](https://github.com/craftcms/cms/issues/4136))
- Fixed a bug where the Plugin Store was not able to load developer details. ([#4241](https://github.com/craftcms/cms/issues/4241))
- Fixed a bug that could occur when Craft generated URLs with multi-byte characters in the query string.

## 3.1.26 - 2019-05-08

Expand Down
4 changes: 2 additions & 2 deletions src/helpers/UrlHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ private static function _createUrl(string $path, $params, string $scheme = null,

// Were there already any query string params in the path?
if (($qpos = mb_strpos($path, '?')) !== false) {
$params = substr($path, $qpos + 1) . ($params ? '&' . $params : '');
$path = substr($path, 0, $qpos);
$params = mb_substr($path, $qpos + 1) . ($params ? '&' . $params : '');
$path = mb_substr($path, 0, $qpos);
}

$generalConfig = Craft::$app->getConfig()->getGeneral();
Expand Down

0 comments on commit ef349e0

Please sign in to comment.