2026-03-30 14:54:57 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Safe;
|
|
|
|
|
|
|
|
|
|
use Safe\Exceptions\XmlrpcException;
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-18 20:32:18 +07:00
|
|
|
* @param \DateTime|string $value
|
|
|
|
|
* @param string $type
|
2026-03-30 14:54:57 +07:00
|
|
|
* @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();
|
|
|
|
|
}
|
|
|
|
|
}
|