Merge branch 'MDL-76334-master' of https://github.com/marinaglancy/moodle

This commit is contained in:
Andrew Nicols
2022-11-17 10:08:49 +08:00
6 changed files with 10 additions and 15 deletions
+2 -7
View File
@@ -23,14 +23,9 @@ class Date
public static function iso8601Encode($timet, $utc = 0)
{
if (!$utc) {
$t = strftime("%Y%m%dT%H:%M:%S", $timet);
$t = date('Ymd\TH:i:s', $timet);
} else {
if (function_exists('gmstrftime')) {
// gmstrftime doesn't exist in some versions of PHP
$t = gmstrftime("%Y%m%dT%H:%M:%S", $timet);
} else {
$t = strftime("%Y%m%dT%H:%M:%S", $timet - date('Z'));
}
$t = gmdate('Ymd\TH:i:s', $timet);
}
return $t;
+1 -1
View File
@@ -315,7 +315,7 @@ class XMLParser
$this->_xh['ac'] = ''; // reset the accumulator
break;
}
// we do not support the <NIL/> extension, so
// if here, we do not support the <NIL/> extension, so
// drop through intentionally
default:
// INVALID ELEMENT: RAISE ISF so that it is later recognized!!!
+1 -1
View File
@@ -80,7 +80,7 @@ class PhpXmlRpc
public static $xmlrpc_internalencoding = "UTF-8";
public static $xmlrpcName = "XML-RPC for PHP";
public static $xmlrpcVersion = "4.8.0";
public static $xmlrpcVersion = "4.8.1";
// let user errors start at 800
public static $xmlrpcerruser = 800;
+4 -4
View File
@@ -262,7 +262,7 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
}
/**
* @param string typ
* @param string $typ
* @param Value[]|mixed $val
* @param string $charsetEncoding
* @return string
@@ -304,12 +304,12 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
case static::$xmlrpcDateTime:
if (is_string($val)) {
$rs .= "<${typ}>${val}</${typ}>";
} elseif (is_a($val, 'DateTime')) {
} elseif (is_a($val, 'DateTime') || is_a($val, 'DateTimeInterface')) {
$rs .= "<${typ}>" . $val->format('Ymd\TH:i:s') . "</${typ}>";
} elseif (is_int($val)) {
$rs .= "<${typ}>" . strftime("%Y%m%dT%H:%M:%S", $val) . "</${typ}>";
$rs .= "<${typ}>" . date('Ymd\TH:i:s', $val) . "</${typ}>";
} else {
// not really a good idea here: but what shall we output anyway? left for backward compat...
// not really a good idea here: but what should we output anyway? left for backward compat...
$rs .= "<${typ}>${val}</${typ}>";
}
break;
+1 -1
View File
@@ -16,7 +16,7 @@ To update:
- Edit this file and update the release and commit details below.
- Edit lib/thirdpartylibs.xml and update the information details too.
Current version imported: 4.8.0 (39e37ed)
Current version imported: 4.8.1 (c74cc31)
Local changes:
* readme_moodle.txt - this file ;-)
+1 -1
View File
@@ -618,7 +618,7 @@ All rights reserved.</copyright>
<location>phpxmlrpc</location>
<name>phpxmlrpc</name>
<description>A php library for building xml-rpc clients and servers</description>
<version>4.8.0</version>
<version>4.8.1</version>
<license>BSD</license>
<licenseversion>3-Clause</licenseversion>
<repository>https://github.com/gggeek/phpxmlrpc</repository>