소스 검색

Add a default string representation

In some part of the code, the search is displayed as is and crash since there is no way to display the search object as a string.
Alexis Degrugillier 11 년 전
부모
커밋
74c020edc8
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      app/Models/Search.php

+ 4 - 0
app/Models/Search.php

@@ -36,6 +36,10 @@ class FreshRSS_Search {
 		$input = $this->parseTagsSeach($input);
 		$input = $this->parseTagsSeach($input);
 		$this->search = $this->cleanSearch($input);
 		$this->search = $this->cleanSearch($input);
 	}
 	}
+	
+	public function __toString() {
+		return $this->getRawInput();
+	}
 
 
 	public function getRawInput() {
 	public function getRawInput() {
 		return $this->raw_input;
 		return $this->raw_input;