mirror of
https://github.com/YGGverse/Yo.git
synced 2026-03-31 09:45:30 +00:00
add url trim
This commit is contained in:
parent
20d3530721
commit
dc807fe4d5
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ $index = $client->index(
|
|||
);
|
||||
|
||||
// Check URL for exist
|
||||
$result = $index->search('@url "' . $argv[1] . '"')
|
||||
$result = $index->search('@url "' . trim($argv[1]) . '"')
|
||||
->limit(1)
|
||||
->get();
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ if ($result->getTotal())
|
|||
// Add
|
||||
$result = $index->addDocument(
|
||||
[
|
||||
'url' => $argv[1]
|
||||
'url' => trim($argv[1])
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue