Skip to content
Permalink
Browse files

Update api.php

API urlencoding fix
  • Loading branch information...
sergejey committed Jul 9, 2019
1 parent e446648 commit 9f9982ccb3f18f3a143490e0fbbf3e9bf8b7447a
Showing with 7 additions and 0 deletions.
  1. +7 −0 api.php
@@ -28,8 +28,15 @@
$url = $_SERVER['REQUEST_URI'];
$url = preg_replace('/\?.+/', '', $url);
$request = explode('/', trim($url, '/'));
array_shift($request);
if (is_array($request)) {
foreach($request as &$param) {
$param=urldecode($param);
}
}
$input = json_decode(file_get_contents('php://input'), true);
$result = array();

0 comments on commit 9f9982c

Please sign in to comment.
You can’t perform that action at this time.