git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e7b08a7
)
Less specific date type detection
author
Surgie
<finesserus@gmail.com>
Wed, 14 Jun 2017 08:46:52 +0000
(18:46 +1000)
committer
GitHub
<noreply@github.com>
Wed, 14 Jun 2017 08:46:52 +0000
(18:46 +1000)
src/Encoder.php
patch
|
blob
|
history
diff --git
a/src/Encoder.php
b/src/Encoder.php
index
220ce88
..
dfec15d
100644
(file)
--- a/
src/Encoder.php
+++ b/
src/Encoder.php
@@
-63,11
+63,11
@@
class Encoder
$out = strtotime($out);
}
if (is_int($out)) {
$out = strtotime($out);
}
if (is_int($out)) {
- $result = new \Date
t
ime();
+ $result = new \Date
T
ime();
$result->setTimestamp($out);
return $result;
$result->setTimestamp($out);
return $result;
- } elseif (is_a($out, 'Date
tim
e')) {
+ } elseif (is_a($out, 'Date
TimeInterfac
e')) {
return $out;
}
}
return $out;
}
}
@@
-179,7
+179,7
@@
class Encoder
case 'object':
if (is_a($phpVal, 'PhpXmlRpc\Value')) {
$xmlrpcVal = $phpVal;
case 'object':
if (is_a($phpVal, 'PhpXmlRpc\Value')) {
$xmlrpcVal = $phpVal;
- } elseif (is_a($phpVal, 'DateTime')) {
+ } elseif (is_a($phpVal, 'DateTime
Interface
')) {
$xmlrpcVal = new Value($phpVal->format('Ymd\TH:i:s'), Value::$xmlrpcStruct);
} else {
$arr = array();
$xmlrpcVal = new Value($phpVal->format('Ymd\TH:i:s'), Value::$xmlrpcStruct);
} else {
$arr = array();