From eedf4e73cf07a1139657a997edebf1d111fa6898 Mon Sep 17 00:00:00 2001 From: Russ Michell Date: Tue, 28 Jun 2016 20:41:10 +1200 Subject: [PATCH] FIX: Fixes Travis build failure (Weird PHP 5.4 root-namespace issue). --- code/models/fieldtypes/JSONText.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/models/fieldtypes/JSONText.php b/code/models/fieldtypes/JSONText.php index 5992125..fb7b449 100755 --- a/code/models/fieldtypes/JSONText.php +++ b/code/models/fieldtypes/JSONText.php @@ -88,7 +88,7 @@ class JSONText extends \StringField protected $jsonStore; /** - * Taken from {@link TextField}. + * Taken from {@link Text}. * * @see DBField::requireField() * @return void @@ -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); } /**