diff --git a/core/Migrations/Version14000Date20180712153140.php b/core/Migrations/Version14000Date20180712153140.php index 04e682a4f6..7f667fa384 100644 --- a/core/Migrations/Version14000Date20180712153140.php +++ b/core/Migrations/Version14000Date20180712153140.php @@ -21,6 +21,7 @@ namespace OC\Core\Migrations; +use OCP\DB\ISchemaWrapper; use OCP\Migration\SimpleMigrationStep; /** @@ -35,10 +36,7 @@ class Version14000Date20180712153140 extends SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->getTable('share'); - $table->addColumn('note', 'text', [ - 'notnull' => true, - 'default' => '' - ]); + $table->addColumn('note', 'text'); return $schema; } diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 73373c7823..e54497c9b5 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -322,7 +322,10 @@ class Share implements \OCP\Share\IShare { * @inheritdoc */ public function getNote() { - return $this->note; + if (is_string($this->note)) { + return $this->note; + } + return ''; } /**