- Removed utf8_encode method which was removed in PHP 8.5
This commit is contained in:
parent
54f209f8e2
commit
562950447e
@ -3,5 +3,5 @@
|
||||
namespace Picea\Extension;
|
||||
|
||||
interface Extension {
|
||||
public function parse(\Picea\Compiler\Context &$context, string $sourceCode, string $token, array $options = []) : string;
|
||||
public function parse(\Picea\Compiler\Context &$context, string $arguments, string $token, array $options = []) : string;
|
||||
}
|
||||
|
||||
@ -9,7 +9,8 @@ use Picea\Extension\FunctionExtension;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
class Request implements Extension, FunctionExtension {
|
||||
class
|
||||
Request implements Extension, FunctionExtension {
|
||||
use ExtensionTrait;
|
||||
|
||||
public array $tokens;
|
||||
@ -80,7 +81,7 @@ class Request implements Extension, FunctionExtension {
|
||||
$post = $this->request->getParsedBody();
|
||||
|
||||
if ( ! $post ) {
|
||||
$content = utf8_encode((string) $this->request->getBody());
|
||||
$content = mb_convert_encoding((string)$this->request->getBody(), 'UTF-8', 'ISO-8859-1');
|
||||
|
||||
if ( $content && ( $json = json_decode($content, true) ) ) {
|
||||
$post = $json;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user