|
@@ -66,7 +66,9 @@ class HomeController extends AbstractController
|
|
|
}
|
|
}
|
|
|
$urls[0][$i] = "~[a-z]+://\S+~";
|
|
$urls[0][$i] = "~[a-z]+://\S+~";
|
|
|
}
|
|
}
|
|
|
- $text = preg_replace($urls[0], $urls[1], $text);
|
|
|
|
|
|
|
+ if (!empty($urls[0])) {
|
|
|
|
|
+ $text = preg_replace($urls[0], $urls[1], $text);
|
|
|
|
|
+ }
|
|
|
for($i=0; $i < sizeof($mentions[0]); $i++) {
|
|
for($i=0; $i < sizeof($mentions[0]); $i++) {
|
|
|
$user = $repository_profile->findOneBy(array('username' => $mentions[1][$i]));
|
|
$user = $repository_profile->findOneBy(array('username' => $mentions[1][$i]));
|
|
|
if ($user) {
|
|
if ($user) {
|