From 8a4ee0506cf8acd61c716976fb6760504ce2e8bc Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 17 Nov 2017 21:25:18 +0100 Subject: use substr() instead of str_replace() --- Zotlabs/Module/Ping.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Ping.php b/Zotlabs/Module/Ping.php index 39f123d21..d05acba6c 100644 --- a/Zotlabs/Module/Ping.php +++ b/Zotlabs/Module/Ping.php @@ -263,10 +263,9 @@ class Ping extends \Zotlabs\Web\Controller { if($t) { foreach($t as $tt) { $message = trim(strip_tags(bbcode($tt['msg']))); - $count = 1; if(strpos($message, $tt['xname']) === 0) - $message = str_replace($tt['xname'], '', $message, $count); + $message = substr($message, strlen($tt['xname']) + 1); $notifs[] = array( 'notify_link' => z_root() . '/notify/view/' . $tt['id'], -- cgit v1.2.3