Skip to content

Commit

Permalink
fix generator method on rule creation
Browse files Browse the repository at this point in the history
  • Loading branch information
semteacher committed Nov 7, 2024
1 parent 41809ee commit ba57c34
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/generator/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ public function create_rule($ruledraft = null) {
$ruleobject->actiondata = json_decode($ruledraft->actiondata);
$ruleobject->rulename = $ruledraft->rulename;
$ruleobject->ruledata = json_decode($ruledraft->ruledata);
if (empty($ruleobject->ruledata)) {
$ruleobject->ruledata = new stdClass();
}

// Setup event name if provided explicitly or from ruledata if provided.
if (!empty($ruledraft->eventname)) {
Expand Down

0 comments on commit ba57c34

Please sign in to comment.