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. 5
      lib/private/Share20/Share.php

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

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

Loading…
Cancel
Save