Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/EmailNotifications/vendor/async-aws/core/src/AwsError/XmlAwsErrorFactory.php
Ðазад
<?php namespace AsyncAws\Core\AwsError; use AsyncAws\Core\Exception\RuntimeException; use AsyncAws\Core\Exception\UnexpectedValue; use AsyncAws\Core\Exception\UnparsableResponse; final class XmlAwsErrorFactory implements AwsErrorFactoryInterface { use AwsErrorFactoryFromResponseTrait; public function createFromContent(string $content, array $headers): AwsError { try { set_error_handler(static function ($errno, $errstr) { throw new RuntimeException($errstr, $errno); }); try { $xml = new \SimpleXMLElement($content); } finally { restore_error_handler(); } return self::parseXml($xml); } catch (\Throwable $e) { throw new UnparsableResponse('Failed to parse AWS error: ' . $content, 0, $e); } } private static function parseXml(\SimpleXMLElement $xml): AwsError { if (0 < $xml->Error->count()) { return new AwsError( $xml->Error->Code->__toString(), $xml->Error->Message->__toString(), $xml->Error->Type->__toString(), $xml->Error->Detail->__toString() ); } if (1 === $xml->Code->count() && 1 === $xml->Message->count()) { return new AwsError( $xml->Code->__toString(), $xml->Message->__toString(), null, null ); } throw new UnexpectedValue('XML does not contains AWS Error'); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка