mirror of
https://github.com/YGGverse/Yo.git
synced 2025-02-05 19:34:14 +00:00
add url trim
This commit is contained in:
parent
20d3530721
commit
dc807fe4d5
@ -24,7 +24,7 @@ $index = $client->index(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check URL for exist
|
// Check URL for exist
|
||||||
$result = $index->search('@url "' . $argv[1] . '"')
|
$result = $index->search('@url "' . trim($argv[1]) . '"')
|
||||||
->limit(1)
|
->limit(1)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ if ($result->getTotal())
|
|||||||
// Add
|
// Add
|
||||||
$result = $index->addDocument(
|
$result = $index->addDocument(
|
||||||
[
|
[
|
||||||
'url' => $argv[1]
|
'url' => trim($argv[1])
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user