visuddhinanda 5 лет назад
Родитель
Сommit
d53a832601
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      app/dict/function.php

+ 3 - 1
app/dict/function.php

@@ -4,7 +4,9 @@ require_once '../public/_pdo.php';
 require_once '../redis/function.php';
 require_once '../redis/function.php';
 
 
 function getRefFirstMeaning($word,$lang,$redis){
 function getRefFirstMeaning($word,$lang,$redis){
-	$word = strstr($word,"[",true);
+	if(strpos($word,"[")){
+		$word = strstr($word,"[",true);
+	}
 	if($redis!==false){
 	if($redis!==false){
 		if(mb_substr($word,0,1,"UTF-8")==="["){
 		if(mb_substr($word,0,1,"UTF-8")==="["){
 			$ending = "-".mb_substr($word,1,-1,"UTF-8");
 			$ending = "-".mb_substr($word,1,-1,"UTF-8");