"---<br />" string is now removed correctly from the end of customization data text
This commit is contained in:
+15
-1
@@ -2739,6 +2739,20 @@ exit;
|
||||
}
|
||||
return $fileAttachment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a substring from another one starting from the right
|
||||
* @param string $str
|
||||
* @param string $str_search
|
||||
* @return string
|
||||
*/
|
||||
public static function rtrimString($str, $str_search)
|
||||
{
|
||||
$length_str = strlen($str_search);
|
||||
if (strlen($str) >= $length_str && substr($str, -$length_str) == $str_search)
|
||||
$str = substr($str, 0, -$length_str);
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2765,4 +2779,4 @@ function cmpPriceDesc($a, $b)
|
||||
elseif ((float)$a['price_tmp'] > (float)$b['price_tmp'])
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user