diff options
author | jesselau76 <jesselau76@gmail.com> | 2018-11-21 04:38:00 +0300 |
---|---|---|
committer | jesselau76 <jesselau76@gmail.com> | 2018-11-21 04:38:00 +0300 |
commit | 7202d957b47a94b497481d1b113cbe8d86866746 (patch) | |
tree | b033ba993d6f18646c72cebd88c7b92c4a4494c4 | |
parent | a0dd949b015cbacbd1160879c5a28330c9509dcf (diff) |
php isset error
-rw-r--r-- | layouts/search/single.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/search/single.html b/layouts/search/single.html index 639cb6f..768c5c1 100644 --- a/layouts/search/single.html +++ b/layouts/search/single.html @@ -1,7 +1,11 @@ {{ define "customphp" -}}
{{ "<?php" | safeHTML }}
-
- $q = $_GET['q'];
+ if (isset($_GET['q']) && $_GET['q'] != '') {
+
+ $q =$_GET['q'];
+}
+
+
$manticore = new mysqli("127.0.0.1", "", "", "", 9306);
$q=$manticore->real_escape_string($q);
$sphinxQl="SELECT * ,SNIPPET(content,'".$q."','limit=200') as snippet FROM hugo WHERE MATCH('".$q."')";
|