aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Migrations/Version14000Date20180712153140.php6
-rw-r--r--lib/private/Share20/Share.php5
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 '';
}
/**