Skip to content

Commit

Permalink
check $table in oncreate_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin committed Dec 16, 2015
1 parent b281d79 commit 83898b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/MaeEventBe.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct()
public function setDefaultCategories($table, $id)
{
$catDefault = $this->User->maeEventCatDefault;
if(is_array($catDefault) && count($catDefault) > 0) {
if($table == "tl_calendar_events" && is_array($catDefault) && count($catDefault) > 0) {
Database::getInstance()->prepare("UPDATE tl_calendar_events SET categories=? WHERE id=?")->execute(serialize($catDefault), $id);
}
}
Expand Down

0 comments on commit 83898b9

Please sign in to comment.