Skip to content

Commit f38b1c6

Browse files
authored
Merge pull request #10 from cloudflare/COM-45
COM-45 :: Bugfix active status in Page Rules
2 parents 48db633 + 635a299 commit f38b1c6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Endpoints/PageRules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function createPageRule(
3535
];
3636

3737
if ($active !== null) {
38-
$options['active'] = $active == true ? 'active' : 'disabled';
38+
$options['status'] = $active == true ? 'active' : 'disabled';
3939
}
4040

4141
if ($priority !== null) {
@@ -117,7 +117,7 @@ public function updatePageRule(
117117
}
118118

119119
if ($active !== null) {
120-
$options['active'] = $active == true ? 'active' : 'disabled';
120+
$options['status'] = $active == true ? 'active' : 'disabled';
121121
}
122122

123123
if ($priority !== null) {

tests/Endpoints/PageRulesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public function testCreatePageRule()
5757
$this->equalTo([
5858
'targets' => $target->getArray(),
5959
'actions' => $action->getArray(),
60-
'active' => 'active',
61-
'priority' => '1'
60+
'status' => 'active',
61+
'priority' => 1
6262
])
6363
);
6464

@@ -217,8 +217,8 @@ public function testUpdatePageRule()
217217
$this->equalTo([
218218
'targets' => $target->getArray(),
219219
'actions' => $action->getArray(),
220-
'active' => 'active',
221-
'priority' => '1'
220+
'status' => 'active',
221+
'priority' => 1
222222
])
223223
);
224224

0 commit comments

Comments
 (0)