Skip to content

Commit

Permalink
Merge pull request #1018 from creative-commoners/pulls/4/stop-depr
Browse files Browse the repository at this point in the history
API Stop using deprecated API
  • Loading branch information
sabina-talipova authored Nov 11, 2022
2 parents 4374a69 + 08be023 commit a3dc468
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/ElementalAreaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function apiSaveForm(HTTPRequest $request)
return null;
}

$data = Convert::json2array($request->getBody());
$data = json_decode($request->getBody(), true);
if (empty($data)) {
$this->jsonError(400);
return null;
Expand Down Expand Up @@ -166,7 +166,7 @@ public function apiSaveForm(HTTPRequest $request)
return null;
}

$body = Convert::raw2json([
$body = json_encode([
'status' => 'success',
'updated' => $updated,
]);
Expand Down
1 change: 0 additions & 1 deletion src/Extensions/ElementalAreaUsedOnTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function updateUsageExcludedClasses(array &$excludedClasses)
*/
public function updateUsage(ArrayList &$usage, DataObject &$record)
{
Deprecation::notice('4.5.0', 'Use updateUsageExcludedClasses() instead');
// noop
}

Expand Down
2 changes: 0 additions & 2 deletions tests/ElementControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ElementControllerTest extends FunctionalTest
{
protected static $fixture_file = 'ElementControllerTest.yml';

protected static $use_draft_site = true;

protected static $required_extensions = [
TestPage::class => [
ElementalPageExtension::class,
Expand Down

0 comments on commit a3dc468

Please sign in to comment.