Skip to content

Commit

Permalink
Update index.php
Browse files Browse the repository at this point in the history
  • Loading branch information
hctilg authored May 18, 2024
1 parent 8e4079e commit ff3ba5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function convert_to_persian(string $phrase, int $max_word_size=15, int $c
$output = [];
$results = $this->f2p_list($phrase, $max_word_size, $cutoff);
foreach ($results as $result) $output[] = $result[0][0];
return implode(' ', $output);
return is_array($output[0]) ? $phrase : implode(' ', $output);
}

private function get_portable_filename(string $filename) {
Expand Down Expand Up @@ -296,4 +296,4 @@ function cartesian_product($arrays) {
}
return $result;
}
}
}

0 comments on commit ff3ba5a

Please sign in to comment.