All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 32s
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s
23 lines
495 B
PHP
23 lines
495 B
PHP
<?php
|
|
|
|
namespace Safe;
|
|
|
|
use Safe\Exceptions\XmlrpcException;
|
|
|
|
/**
|
|
* Sets xmlrpc type, base64 or datetime, for a PHP string value.
|
|
*
|
|
* @param \DateTime|string $value Value to set the type
|
|
* @param string $type 'base64' or 'datetime'
|
|
* @throws XmlrpcException
|
|
*
|
|
*/
|
|
function xmlrpc_set_type(&$value, string $type): void
|
|
{
|
|
error_clear_last();
|
|
$safeResult = \xmlrpc_set_type($value, $type);
|
|
if ($safeResult === false) {
|
|
throw XmlrpcException::createFromPhpError();
|
|
}
|
|
}
|