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)
parent
commit
94c7052482
No known key found for this signature in database GPG Key ID: 60C25B8C072916CF
  1. 6
      core/Migrations/Version14000Date20180712153140.php
  2. 3
      lib/private/Share20/Share.php

6
core/Migrations/Version14000Date20180712153140.php

@ -21,6 +21,7 @@
namespace OC\Core\Migrations; namespace OC\Core\Migrations;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\SimpleMigrationStep; use OCP\Migration\SimpleMigrationStep;
/** /**
@ -35,10 +36,7 @@ class Version14000Date20180712153140 extends SimpleMigrationStep {
$schema = $schemaClosure(); $schema = $schemaClosure();
$table = $schema->getTable('share'); $table = $schema->getTable('share');
$table->addColumn('note', 'text', [
'notnull' => true,
'default' => ''
]);
$table->addColumn('note', 'text');
return $schema; return $schema;
} }

3
lib/private/Share20/Share.php

@ -322,8 +322,11 @@ class Share implements \OCP\Share\IShare {
* @inheritdoc * @inheritdoc
*/ */
public function getNote() { public function getNote() {
if (is_string($this->note)) {
return $this->note; return $this->note;
} }
return '';
}
/** /**
* @inheritdoc * @inheritdoc

Loading…
Cancel
Save