Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

FIX #1971: Check if the search term is set

  • Loading branch information...
commit edaf7097834572b4d0c4d53883a6c5694892324c 1 parent 916de30
@JayDevlin JayDevlin authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 model/fieldtypes/Text.php
View
5 model/fieldtypes/Text.php
@@ -239,7 +239,10 @@ public function FirstParagraph($plain = 1) {
public function ContextSummary($characters = 500, $string = false, $striphtml = true, $highlight = true,
$prefix = "... ", $suffix = "...") {
- if(!$string) $string = $_REQUEST['Search']; // Use the default "Search" request variable (from SearchForm)
+ if(!$string) {
+ // Use the default "Search" request variable (from SearchForm)
+ $string = isset($_REQUEST['Search']) ? $_REQUEST['Search'] : '';
+ }
// Remove HTML tags so we don't have to deal with matching tags
$text = $striphtml ? $this->NoHTML() : $this->value;
Please sign in to comment.
Something went wrong with that request. Please try again.