Skip to content

Commit 0e4e6a0

Browse files
committed
Fixed exception "Undefined index: default_description" when creating a new part.
1 parent 3cc2f7f commit 0e4e6a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/Category.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,13 @@ public function getDefaultDescription($including_parents = false, $show_escape =
223223

224224
return "";
225225
} else {
226-
if ($show_escape || $this->db_data['default_description'] !== "@@") {
227-
return $this->db_data['default_description'];
228-
} else {
229-
return "";
226+
if(isset($this->db_data['default_description'])) {
227+
if ($show_escape || $this->db_data['default_description'] !== "@@") {
228+
return $this->db_data['default_description'];
229+
}
230230
}
231+
232+
return "";
231233
}
232234
}
233235

0 commit comments

Comments
 (0)