This commit is contained in:
emmymayo
2025-02-05 23:15:46 +01:00
commit 7269c99357
16995 changed files with 3389680 additions and 0 deletions
@@ -0,0 +1,19 @@
<?php
namespace MailPoetVendor\Symfony\Polyfill\Php81;
if (!defined('ABSPATH')) exit;
final class Php81
{
public static function array_is_list(array $array) : bool
{
if ([] === $array || $array === \array_values($array)) {
return \true;
}
$nextKey = -1;
foreach ($array as $k => $v) {
if ($k !== ++$nextKey) {
return \false;
}
}
return \true;
}
}
@@ -0,0 +1,33 @@
<?php
namespace MailPoetVendor;
if (!defined('ABSPATH')) exit;
if (\PHP_VERSION_ID >= 70400 && \extension_loaded('curl')) {
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};
}
}
}
@@ -0,0 +1,12 @@
<?php
namespace MailPoetVendor;
if (!defined('ABSPATH')) exit;
if (\PHP_VERSION_ID < 80100) {
#[\Attribute(\Attribute::TARGET_METHOD)]
final class ReturnTypeWillChange
{
public function __construct()
{
}
}
}
@@ -0,0 +1,21 @@
<?php
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Symfony\Polyfill\Php81 as p;
if (\PHP_VERSION_ID >= 80100) {
return;
}
if (\defined('MYSQLI_REFRESH_SLAVE') && !\defined('MYSQLI_REFRESH_REPLICA')) {
\define('MYSQLI_REFRESH_REPLICA', 64);
}
if (!\function_exists('array_is_list')) {
function array_is_list(array $array) : bool
{
return p\Php81::array_is_list($array);
}
}
if (!\function_exists('enum_exists')) {
function enum_exists(string $enum, bool $autoload = \true) : bool
{
return $autoload && \class_exists($enum) && \false;
}
}