Skip to content

Commit

Permalink
find method fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1881 committed Aug 18, 2022
1 parent 671559e commit d4c70df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,14 +893,14 @@ public function find($search_datas, $source = null, bool $remove_line_break = fa
if (\is_array($search_datas)) {
foreach ($search_datas as $search_data) {
$search_data_regex = \preg_quote($search_data, '/');
if (\preg_match('/' . $search_data_regex . '/si', $source) || $this->contains($search_data)) {
if (\preg_match('/' . $search_data_regex . '/si', $source) || $this->contains($search_data, $source)) {
$json->result = true;
$json->finded[] = $search_data;
}
}
} else {
$search_data = \preg_quote($search_datas, '/');
if (\preg_match('/' . $search_data . '/si', $source) || $this->contains($search_data)) {
if (\preg_match('/' . $search_data . '/si', $source) || $this->contains($search_data, $source)) {
$json->result = true;
$json->finded = $search_datas;
}
Expand Down

0 comments on commit d4c70df

Please sign in to comment.