Skip to content

Commit

Permalink
FIX: Fixes Travis build failure (Weird PHP 5.4 root-namespace issue).
Browse files Browse the repository at this point in the history
  • Loading branch information
phptek committed Jun 28, 2016
1 parent cf178da commit eedf4e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/models/fieldtypes/JSONText.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class JSONText extends \StringField
protected $jsonStore;

/**
* Taken from {@link TextField}.
* Taken from {@link Text}.
*
* @see DBField::requireField()
* @return void
Expand All @@ -107,7 +107,9 @@ public function requireField()
'parts' => $parts
];

\DB::require_field($this->tableName, $this->name, $values);
// Weirdly, namespacing-as-root ala \DB::require_field() fails in PHP v5.4
$db = singleton('DB');
$db::require_field($this->tableName, $this->name, $values);
}

/**
Expand Down

0 comments on commit eedf4e7

Please sign in to comment.