From ed03f8fdca060cf200834e8ca3d7277ba591bc94 Mon Sep 17 00:00:00 2001 From: allyans3 Date: Wed, 2 Sep 2020 00:36:02 +0300 Subject: [PATCH] Fix --- README.md | 4 ++-- src/Requests/MarketItems.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9f5a81d..6451878 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ $options = [ 'orderBy' => 'best_deals', // ['price', 'best_deals', 'best_discount', 'updated'] 'orderDir' => 'desc', // ['asc', 'desc'] 'title' => '', // Field for search skins: 'AK-47 | The Empress' - 'priceFrom' => 0, // 0 if from Inf to Inf - 'priceTo' => 0, // 0 if from Inf to Inf + 'priceFrom' => 0, // 0 if from -Inf to +Inf + 'priceTo' => 0, // 0 if from -Inf to +Inf 'treeFilters' => '', 'types' => 'dmarket', // ['dmarket', 'p2p'] 'offset' => 0, diff --git a/src/Requests/MarketItems.php b/src/Requests/MarketItems.php index 1f70f91..b608e6a 100644 --- a/src/Requests/MarketItems.php +++ b/src/Requests/MarketItems.php @@ -52,7 +52,7 @@ private function setOptions($options) { $this->orderBy = $options['orderBy'] ?? $this->orderBy; $this->orderDir = $options['orderDir'] ?? $this->orderDir; - $this->title = $options['title'] ?? $this->title; + $this->title = isset($options['title']) ? rawurlencode($options['title']) : $this->title; $this->priceFrom = $options['priceFrom'] ?? $this->priceFrom; $this->priceTo = $options['priceTo'] ?? $this->priceTo; $this->treeFilters = $options['treeFilters'] ?? $this->treeFilters;