allow 'note' to be null

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
Bjoern Schiessle 2018-07-13 11:41:53 +02:00 committed by John Molakvoæ (skjnldsv)
parent b81962e3e8
commit 94c7052482
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
2 changed files with 6 additions and 5 deletions

View File

@ -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;
}

View File

@ -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 '';
}
/**