We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c082f4 commit b9ccf9aCopy full SHA for b9ccf9a
src/Services/ModelService.php
@@ -40,8 +40,14 @@ public function getFullTextIndexFields()
40
foreach ($searchableFields as $searchableField) {
41
42
//@TODO cache this.
43
- $columnType = DB::connection($this->connectionName)->
44
- select("SHOW FIELDS FROM $this->tableName where Field = ?", [$searchableField])[0]->Type;
+ $sql = "SHOW FIELDS FROM $this->tableName where Field = ?";
+ $column = DB::connection($this->connectionName)->select($sql, [$searchableField]);
45
+
46
+ if (!isset($column[0])) {
47
+ continue;
48
+ }
49
50
+ $columnType = $column[0]->Type;
51
52
if ($this->isFullTextSupportedColumnType($columnType)) {
53
$indexFields[] = $searchableField;
0 commit comments