diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2018-07-13 11:41:53 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-07-21 15:02:19 +0200 |
commit | 94c70524820a51bc34a1539a93cd6bbb4bc31193 (patch) | |
tree | 810ab404ccebf976fb922329b9ebc8f211cdf10e | |
parent | b81962e3e865e9187d099bcb958cec9acfc7d593 (diff) | |
download | nextcloud-server-94c70524820a51bc34a1539a93cd6bbb4bc31193.tar.gz nextcloud-server-94c70524820a51bc34a1539a93cd6bbb4bc31193.zip |
allow 'note' to be null
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r-- | core/Migrations/Version14000Date20180712153140.php | 6 | ||||
-rw-r--r-- | lib/private/Share20/Share.php | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/core/Migrations/Version14000Date20180712153140.php b/core/Migrations/Version14000Date20180712153140.php index 04e682a4f68..7f667fa3847 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 73373c7823d..e54497c9b55 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 ''; } /** |