updated plugin WP-WebAuthn
version 1.3.4
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2021 Fabien Potencier
|
||||
Copyright (c) 2021-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -7,6 +7,7 @@ This component provides features added to PHP 8.1 core:
|
||||
- [`enum_exists`](https://php.net/enum-exists)
|
||||
- [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant
|
||||
- [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types)
|
||||
- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used)
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
||||
|
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
|
||||
/**
|
||||
* @property string $data
|
||||
*/
|
||||
class CURLStringFile extends CURLFile
|
||||
{
|
||||
private $data;
|
||||
|
||||
public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
|
||||
{
|
||||
$this->data = $data;
|
||||
parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
|
||||
}
|
||||
|
||||
public function __set(string $name, $value): void
|
||||
{
|
||||
if ('data' !== $name) {
|
||||
$this->$name = $value;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
|
||||
throw new TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
|
||||
}
|
||||
|
||||
$this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
|
||||
}
|
||||
|
||||
public function __isset(string $name): bool
|
||||
{
|
||||
return isset($this->$name);
|
||||
}
|
||||
|
||||
public function &__get(string $name)
|
||||
{
|
||||
return $this->$name;
|
||||
}
|
||||
}
|
||||
}
|
@ -25,9 +25,6 @@
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
|
Reference in New Issue
Block a user