[wp-trac] [WordPress Trac] #42995: Wordpress XML-RPC editComment return error 500 changing date_created_gmt
WordPress Trac
noreply at wordpress.org
Thu Dec 28 19:01:26 UTC 2017
#42995: Wordpress XML-RPC editComment return error 500 changing date_created_gmt
--------------------------+-----------------------------
Reporter: fpilee | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: 4.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Grettings,
This:
// Do some timestamp voodoo
if (!empty($content_struct['date_created_gmt'])) {
// We know this is supposed to be GMT, so we're going to slap that
Z on there by force
$dateCreated =
rtrim($content_struct['date_created_gmt']->getIso(), 'Z') . 'Z';
$comment_date =
get_date_from_gmt(iso8601_to_datetime($dateCreated));
$comment_date_gmt = iso8601_to_datetime($dateCreated, 'GMT');
}
[Thu Dec 28 15:52:34.123148 2017] [php7:notice] [pid 5507] [client
127.0.0.1:39464] PHP Fatal error: Uncaught Error: Call to a member
function getIso() on string in wp-includes/class-wp-xmlrpc-server.php:3533
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42995>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list