Browse Source
allow 'note' to be null
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
pull/10218/head
Bjoern Schiessle
7 years ago
committed by
John Molakvoæ (skjnldsv)
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
2 changed files with
6 additions and
5 deletions
-
core/Migrations/Version14000Date20180712153140.php
-
lib/private/Share20/Share.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; |
|
|
|
} |
|
|
|
|
|
|
|
@ -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 ''; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|